Re: Sequence size limits
- Posted by cp Apr 25, 2011
- 1338 views
Are there any internal limits to the size of a given sequence beyond machine ram limits?
The maximum number of elements is (2^N)-1, where N is the number of bits that a CPU register can hold. So in 32-bit systems this works out as 4,294,967,295 elements, and thus it would be more common to run out of memory before you reach that maximum.
In fact, the maximum size of a sequence will be the same when using 64-bit euphoria. Even there, it will be more likely to run out of memory than to hit the limit. A sequence requires a few bytes of overhead, plus 4 (or 8 on 64-bits) bytes for each element.
That means that with 32-bits euphoria, a sequence of maximal size would require something like an 8GB contiguous chunk of memory. For 64-bit euphoria (coming in 4.1), it would be 16GB.
Matt
Matt, On 64bit Euphoria, could the maximum number of sequence elements be increased to a 64bit integer?