in reply to Re: array pre-allocation trick
in thread array pre-allocation trick

I apologize, I didn't read that comment strictly enough.

No, push is going to grow your array. Try something like:

for ( 0..4999) { $array[$_] = $_; }
Although if you really are really tight, you may want to test if a while or C-style loop is faster than building the list of integers.