Daniel Stutzbach <stutzb...@google.com> added the comment:

> Just wanted to post this so there weren't any illusions about the
> patch being a big win.

> When a key function is defined, this is all you can possibly shave
> off the time for a comparison.

I don't want to argue whether the patch is a big win or not (I recognize that 
it is a tradeoff), but when using a key it does shave off more than the call to 
sortwrapper_richcompare.

Stack with sortwrapper:

long_richcompare
do_richcompare
PyObject_RichCompare
sortwrapper_richcompare
do_richcompare
PyObject_RichCompare
PyObject_RichCompareBool
count_run
list_sort

Stack without:

long_richcompare
do_richcompare
PyObject_RichCompare
PyObject_RichCompareBool
count_run
list_sort

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue9915>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to