Perl Monk, Perl Meditation | |
PerlMonks |
Re^4: Hash Search is VERY slowby LanX (Saint) |
on Sep 29, 2021 at 23:14 UTC ( [id://11137129]=note: print w/replies, xml ) | Need Help?? |
Oh I missed that. => Re: Hash Search is VERY slow Brilliant! > that the array was getting cloned I think it's not so much the copying alone but the allocation of a new array each time. Because the arrays are growing, old released memory often can't be reused, leading to a fragmentation and increasing waste of space. Fun! :) Tho I might be wrong, the reserved space for an array grows by doubling IIRC, this should be easier to reuse ...
Cheers Rolf
In Section
Seekers of Perl Wisdom
|
|