At 12:35 +0200 2010-07-15, Moritz Lenz wrote:
If it ever were the case that $r + $l could produce an overflow

Then we really have other problems. Remember that $r and $l are array indexes. If your machine has enough memory to hold an array and a hash of the same size in memory, but can't store integers long enough to index them, you're basically screwed.

Still, I wonder about the cases
a) my machine can store integers long enough to index my arrays
   yet not be able to store an integer twice that size

b) my array and hash are not in memory, rather the array is on disk
   and the hash is over the network to some database, and the arrayness
   and hashness are just roles.

What assumptions should we be making about the underlying implementation
of the array and hash?


Also Int numbers are specified to transparently upgrade to bigints if necessary, so that's hardly a problem in Perl 6.

On the one hand this is nice ... on the other hand it would be nice to not be forced to take that performance hit.

Regards,
Todd

Reply via email to