sorry I misunderstood your question, looked like you are comparing $a[$_] = int(rand (100)) for(0..10000000);
for(0..10000000) iterates dynamically but map{...}@a flattens the list which results in shuffling memory...
Better try @a in both cases and the results should level.
In reply to Re: map vs for\foreach.
by LanX
in thread map vs for\foreach.
by builat
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |