Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
Re: performance of huge array loopingby RMGir (Prior) |
on Aug 14, 2002 at 11:58 UTC ( [id://190037]=note: print w/replies, xml ) | Need Help?? |
If you're dealing with that much data, do you REALLY need to load it all into memory in an array?
Given that you're only looking at each item once, it would make more sense to either process the data line-by-line from a text file (if it's that kind of data), or iterate over it record-by-record from a database using DBI.
You program will run MUCH faster, as a bonus, since you're not going to be swapping. This is definitely a case where loading things in memory won't be an optimization.
In Section
Seekers of Perl Wisdom
|
|