in reply to Array Shuffle
List::Util's shuffle is a little faster still. Adding:
my $sub3 = sub { shuffle (@randomarray); };
and changing timethese to cmpthese (with other changes as required) gives:
Rate Sub 2 Sub 1 Sub 32 Sub 2 14869/s -- -13% -89% Sub 1 17066/s 15% -- -87% Sub 32 131573/s 785% 671% --
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Array Shuffle
by ikegami (Patriarch) on Jun 11, 2007 at 14:43 UTC | |
by Limbic~Region (Chancellor) on Jun 11, 2007 at 16:43 UTC | |
by GrandFather (Saint) on Jun 11, 2007 at 19:11 UTC | |
|
Re^2: Array Shuffle
by logie17 (Friar) on Jun 11, 2007 at 15:30 UTC |