[Python-Dev] Sorting

Tim Peters tim.one@comcast.net
Fri, 26 Jul 2002 12:02:34 -0400

Apart from fine-tuning and rewriting the doc file, I think the mergesort is
done.  I'm confident that if any bugs remain, I haven't seen them <wink>.  A
patch against current CVS listobject.c is here:


Simple instructions for timing exactly the same data I've posted times
against are in the patch description (you already have sortperf.py -- it's
in Lib/test).  This patch doesn't replace samplesort, it adds a new .msort()
method, to make comparative timings easier.  It also adds an .hsort() method
for weak heapsort, because I forgot to delete that code after I gave up on
it <wink>.

X-platform samplesort timings are interesting as well as samplesort versus
mergesort timings.  Timings against "real life" sort jobs are especially
interesting.  Attaching results to the bug report sounds like a good idea to
me, so we get a coherent record in one place.

Thanks in advance!