in reply to Re: Sloooooow algo in Perl
in thread Sloooooow algo in Perl
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.
|
|---|