Message40650
This adds method list.msort([compare]).
Lib/test/sortperf.py is already a sort performance
test. To run it on exactly the same data I used, run it
via
python -O sortperf.py 15 20 1
That will time the current samplesort (even after this
patch). After getting stable numbers for that, change
sortperf's doit() to say L.msort() instead of L.sort(),
and you'll time the mergesort instead.
CAUTION: To save time across many runs, sortperf
saves the random floats it generates, into temp files.
If those temp files already exist when sortperf starts,
it reads them up instead of generating new numbers.
As a result, it's important in the above to pass "1" as
the last argument the *first* time you run sortperf --
that forces the random # generator into the same
state it was when I used it.
This patch also gives lists a new list.hsort() method,
which is a weak heapsort I gave up on. Time it if you
want to see how bad an excellent sort can get <wink>.
|
|
Date |
User |
Action |
Args |
2007-08-23 15:14:15 | admin | link | issue587076 messages |
2007-08-23 15:14:15 | admin | create | |
|