Perl's dynamic allocation algorithm is designed so that the average cost of resizing and reallocating works out to be a constant amount per push. I'm not sure that avoiding that cost only to have to keep track of what index you're on will be a win.
In reply to Re^2: Sloooooow algo in Perl
by tilly
in thread Sloooooow algo in Perl
by cormanaz
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |