in reply to Re^4: Is this a fair shuffle?
in thread Is this a fair shuffle?
That's not fair.
I guess it depends upon what the aim is. If you simple want an array shuffled quicky, doing it in place is totally fair.
But it doesn't seem to make a lot of difference in the benchmark time.
As the arrays being shuffled only have 4 elements, the in-placeness makes almost no difference, but once you start shuffling arrays of a few hundred items, it has a fairly dramatic effect.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^6: Is this a fair shuffle?
by Roy Johnson (Monsignor) on Apr 01, 2005 at 11:51 UTC | |
by BrowserUk (Patriarch) on Apr 01, 2005 at 12:00 UTC | |
by Roy Johnson (Monsignor) on Apr 01, 2005 at 12:08 UTC |