This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author tim.peters
Recipients elliot.gorokhovsky, eryksun, godaygo, mdk, ppperry, rhettinger, serhiy.storchaka, tim.peters, vstinner
Date 2018-01-29.03:39:28
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Thank you for giving this worthy orphan a home, Raymond!

Victor, don't fret too much.  The code is really quite simple, and at worst affects only `sorted()` and `list.sort()`.  The vast bulk of review effort (of which it got enough) went into dreaming up pathological cases (like mutating list elements, and even list element comparison methods, _while_ a sort was in progress).

I confess I didn't press for more benchmarks, because I don't care about more here:  the code is so obviously a major speed win when it applies, it so obviously applies often, and the new worst-case overhead when it doesn't apply is so obviously minor compared to the cost of a sort (`len(list)-1` wasted C-level pointer equality compares).  The only real value of timing benchmarks to me here was as a gross sanity check, and enough of those were run to confirm that all the preceding were qualitatively on target.  It really doesn't matter at all, e.g., whether the best cases are 2 times faster or 10 times faster, or the truly pathologal worst cases 10% slower or 20% slower.  Regardless, it's as close to a pure win as just about anything can be.

Nevertheless ... if this brings a major player's server to its knees, blame Raymond ;-)
Date User Action Args
2018-01-29 03:39:29tim.peterssetrecipients: + tim.peters, rhettinger, vstinner, serhiy.storchaka, eryksun, ppperry, mdk, elliot.gorokhovsky, godaygo
2018-01-29 03:39:29tim.peterssetmessageid: <>
2018-01-29 03:39:29tim.peterslinkissue28685 messages
2018-01-29 03:39:28tim.peterscreate