in reply to Re^3: Is this a fair shuffle?
in thread Is this a fair shuffle?

It would also be good to add List::Util::shuffle to the benchmark. I assume it would beat my perl implementation hands down for small arrays, but mine is probably still quicker for large arrays because it operates in place?

If you are referring to the Perl implementation of List::Util::shuffle, then yes a Perl implementation of FY (like yours) wins, but naturally the C implementation of List::Util::shuffle (which is the default) handily beats a Perl implementation of FY (lup = List::Util::shuffle in Perl; luc = List::Util::shuffle in C; fyp = Fisher-Yates in Perl):

Rate lup fyp luc lup 1.64/s -- -12% -83% fyp 1.87/s 14% -- -80% luc 9.43/s 476% 406% --
That's for sorting an array of 105 elements.

the lowliest monk