Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much

Re: performance of huge array looping

by PhiRatE (Monk)
on Aug 14, 2002 at 22:19 UTC ( #190251=note: print w/replies, xml ) Need Help??

in reply to performance of huge array looping

Its this kind of comment which is fundamentally interesting because of what it *doesn't* say. The value or lack thereof in attempting to shift out elements of the array and thus slowly reduce your memory requirements is insignificant in comparison to the huge burning question of why you need a once-only array in the gigabyte range anyway.

Even the (dubious) need to sort the entire array would probably be better handled by a chunked merge-sort writing clusters to disk rather than leaving it up to the kernel VM which, while good, cannot do the nice usage predictions you can do on your own paging system under those circumstances.

In addition, there may be considerable statistical optimisations that can be done if more details of the nature of the data are known.

So, lets be clear, there may be a modicum of performance to be gained by not shifting vs shifting, however vastly more performance is likely to be gained by posting a better description of the problem here so the algorithm junkies can tell you how to do it without chewing gigabytes of ram.

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://190251]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (3)
As of 2023-05-30 23:18 GMT
Find Nodes?
    Voting Booth?

    No recent polls found