in reply to Re: Re: Selecting random records from an array
in thread Selecting random records from an array

... the results are not well- defined.

Isn't that exactly why it works (for some definition of the term:)? The whole point of making a random selection is to achieve a "not-well defined" result?

That said, this 'desort' method of shuffling an array doesn't stand up to analysis for another reason. Statistically, the results are extremely biased as I showed here. Note the abysmal standard deviation of this method (labelled 'qsort', as it was done under 5.6).

Might be interesting to see what sort[sic] of results you would get using the default mergesort in 5.8.


Examine what is said, not who speaks.
"Efficiency is intelligent laziness." -David Dunham
"When I'm working on a problem, I never think about beauty. I think only how to solve the problem. But when I have finished, if the solution is not beautiful, I know it is wrong." -Richard Buckminster Fuller


  • Comment on Re: Re: Re: Selecting random records from an array