in reply to Re: Re: Re: array pre-allocation trick
in thread array pre-allocation trick
I've replaced "do_stuff_with($_)" with a no-op. It didn't perform as well as the others, so that leads me to think I shouldn't pursue using map in this case.my @array = map { do_stuff_with($_); $_ } 1 .. 5000;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: array pre-allocation trick
by Aristotle (Chancellor) on Nov 02, 2002 at 06:52 UTC |