Perl: the Markov chain saw | |
PerlMonks |
Re^3: Deleting specific array elementsby salva (Canon) |
on Nov 26, 2008 at 10:47 UTC ( [id://726066]=note: print w/replies, xml ) | Need Help?? |
That's very inefficient, O(N^2) worst case under the hood. If your data is so big it doesn't fits in memory, it is not a good solution either. Note also, that the grep solution is swap-friendly as it access memory in a sequential manner.
Anyway, if you want to minimize memory usage and still be O(N):
In Section
Seekers of Perl Wisdom
|
|