in reply to map vs for\foreach.
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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: map vs for\foreach.
by builat (Monk) on Mar 11, 2015 at 14:28 UTC | |
by LanX (Saint) on Mar 11, 2015 at 14:36 UTC | |
by ikegami (Patriarch) on Mar 13, 2015 at 17:35 UTC | |
by builat (Monk) on Mar 11, 2015 at 14:40 UTC | |
by LanX (Saint) on Mar 11, 2015 at 14:56 UTC |