And if swapping the ordering of the tests doesn't convince you, then try constructing both arrays using the same method.
You'll find that the benchmark shows a difference even when they are both constructed the same way.
It's worth bearing in mind that given the huge numbers of iterations being performed, even the largest (12%) difference shown, represents a difference of 0.000,000,014 of a second which hardly makes it a "large difference".
In reply to Re: Perl array performance puzzle
by BrowserUk
in thread Perl array performance puzzle
by fizbin
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |