llancet has asked for the wisdom of the Perl Monks concerning the following question:
while (my $value=shift @array) while (my $value=pop @array) foreach my $value (@array) # this might be the slowest for (my $i=0;$i<=@array;$i++) { my $value=$array[$i]; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How to traverse an array as fast as possible?
by moritz (Cardinal) on Jun 17, 2009 at 06:14 UTC | |
|
Re: How to traverse an array as fast as possible?
by ciderpunx (Vicar) on Jun 17, 2009 at 07:29 UTC | |
|
Re: How to traverse an array as fast as possible?
by graff (Chancellor) on Jun 17, 2009 at 06:25 UTC | |
|
Re: How to traverse an array as fast as possible?
by Anonymous Monk on Jun 17, 2009 at 06:15 UTC | |
|
Re: How to traverse an array as fast as possible?
by llancet (Friar) on Jun 17, 2009 at 09:03 UTC |