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;
In reply to Re: Re: Re: Re: array pre-allocation trick
by Anonymous Monk
in thread array pre-allocation trick
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |