Commit graph

8 commits

Author SHA1 Message Date
Tim Peters
8b6ec79b74 Gave this a facelift: "/" vs "//", whrandom vs random, etc. Boosted
the default range to end at 2**20 (machines are much faster now).
Fixed what was quite a arguably a bug, explaining an old mystery:  the
"!sort" case here contructs what *was* a quadratic-time disaster for
the old quicksort implementation.  But under the current samplesort, it
always ran much faster than *sort (the random case).  This never made
sense.  Turns out it was because !sort was sorting an integer array,
while all the other cases sort floats; and comparing ints goes much
quicker than comparing floats in Python.  After changing !sort to chew
on floats instead, it's now slower than the random sort case, which
makes more sense (but is just a few percent slower; samplesort is
massively less sensitive to "bad patterns" than quicksort).
2002-07-18 15:53:32 +00:00
Andrew M. Kuchling
a9745611de Use random instead of whrandom 2002-04-10 14:54:39 +00:00
Eric S. Raymond
fc170b1fd5 String method conversion. 2001-02-09 11:51:27 +00:00
Guido van Rossum
16653cb273 Add Tim's worst case scenario.
Revert to using whrandom so it will work with older versions of Python.
1998-05-26 15:05:12 +00:00
Guido van Rossum
b26a1b4e2b Use random instead of whrandom. 1998-05-20 17:05:52 +00:00
Guido van Rossum
b298a300dd Reduce memory requirements. 1998-05-12 13:21:31 +00:00
Guido van Rossum
03e35c548f Add a few doc strings. 1998-05-10 18:27:29 +00:00
Guido van Rossum
ea176b663e benchmark for list.sort() 1998-05-10 18:20:05 +00:00