in reply to Limit on array size?

Provided your numbers are integers (signed 32-bit), you could reduce your memory requirements for the array from around 440MB to 54MB by using Packed::Array. It will slow the processing down somewhat, but it should easily handle the volume on most modern machines.

Be sure to heed the advice about pushing to the array as you go, rather than slurping the whole lot and then converting to an array, otherwise your just chewing the memory to hold the huge scalar for no reason.


Examine what is said, not who speaks.
"Efficiency is intelligent laziness." -David Dunham
"Think for yourself!" - Abigail
Hooray!
Wanted!