Re: Searching for Fastest Way to Input a File
- Posted by jimcbrown (admin) May 15, 2014
- 2722 views
It's actually a limit of sequences. After all, 1073741823 should be enough sequence elements for everyone!
I'm pretty sure matt's comment is a joke (in-line with the supposed (and likely untrue) Bill Gates reference that "640K of RAM should be enough for everyone").
The Bill Gates reference is accurate. At the time he was telling users of 64k computers (like Commodore 64) that 640k was a huge number.
The funny part was that Bill Gates provided lots of 64k limits in DOS.
Wikipedia: "The size of 64 kilobytes is a traditional limit which was inherited from the maximum size of a COM file."
The reference to computer folklore is accurate. It's not clear if Bill Gates really stated the quote, however.
I recall at some point, I read a webpage that said Bill Gates had in the 1980s said to an audience of students that 640K would be enough for 10 years or something along those lines, which got corrupted into the form that folklore recalls today. Not sure if that's true, however.
In 64bit, I agree. There's no sane reason to have a limit.
Is this limit going to be raised?
I made a mistake here. I took a closer look at the code, and this is what it actually does:
if (count > MAXINT_DBL) RTFatal("repetition count must not be more than 1073741823");
(from source/be_runtime.c)
Here's how MAXINT_DBL is defined:
#define MAXINT_DBL ((eudouble)MAXINT)
And here's the actual limit for 32bit:
#define MAXINT (intptr_t) 0x3FFFFFFFL
But it's set to this for 64bit:
#define MAXINT (intptr_t) INT64_C( 0x3FFFFFFFFFFFFFFF )
(The last three snippnets are from include/euphoria.h)
So, if the true limit is ever reached, the error message udner 64bits will be wrong. But the limit for 64bit has already been raised.