in reply to Re: Is this a fair shuffle?
in thread Is this a fair shuffle?
The Std Dev drops to competitive levels, but the performance drops to last. Two or three calls to sort isn't sufficient. It was surprising to me that the time required for two chained sorts is so much more than for one.sub qshuf { sort { .5 <=> rand(1) } sort { .5 <=> rand(1) } sort { .5 <=> rand(1) } sort { .5 <=> rand(1) } @_; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Is this a fair shuffle?
by BrowserUk (Patriarch) on Apr 01, 2005 at 04:56 UTC | |
by Roy Johnson (Monsignor) on Apr 01, 2005 at 05:12 UTC | |
by blokhead (Monsignor) on Apr 01, 2005 at 05:29 UTC | |
by BrowserUk (Patriarch) on Apr 01, 2005 at 05:18 UTC | |
by Roy Johnson (Monsignor) on Apr 01, 2005 at 11:51 UTC | |
by BrowserUk (Patriarch) on Apr 01, 2005 at 12:00 UTC | |
| |
by Anonymous Monk on Apr 01, 2005 at 09:39 UTC | |
by tlm (Prior) on Apr 01, 2005 at 13:37 UTC |