http://www.perlmonks.org?node_id=275931


in reply to Re: Re: Slowness when inserting into pre-extended array
in thread Slowness when inserting into pre-extended array

This doesn't seem to have anything at all to do with hashes, as the only difference between the slow and fast versions of the program is that the slow version pushes onto an array while the fast version doesn't. Given perl's behaviour with array extension, I'd pretty much guarantee that the problem is the array push, with a lesser possibility being a process memory freelist fragmentation from all the hash allocations, but I'd doubt that one.