in reply to Re^3: Randomly select values from array
in thread Randomly select values from array

But why combine an O( N! ) algorithm with an O(N log N) algorithm, when Fischer-Yates is O(N)?

List::Util::shuffle() does a million 4 way shuffles in less than 1 second.

Replies are listed 'Best First'.
Re^5: Randomly select values from array
by blakew (Monk) on May 16, 2010 at 19:37 UTC
    I was shooting for humorous understatement, guess it wasn't obvious enough. I agree it's a horrible idea to actually use, I was just practicing to see why the original sort version doesn't work for myself.