[issue9915] speeding up sorting with a key

Raymond Hettinger report at bugs.python.org
Thu Dec 2 00:16:45 CET 2010


Raymond Hettinger <rhettinger at users.sourceforge.net> added the comment:

Thanks.  This nice, clean diff is much more reviewable and it looks like what I expected.   

The use of  Py_LOCAL_INLINE is new to me since we usually use #define instead, but this has a cleaner look to it.  I am unclear on whether all the our target compilers support an inline keyword.   If you're sure it works everywhere, that's great.  If not, consider going back to ugly defines -- those reliably work everywhere.

Also note that this patch puts a lot of faith in branch prediction.  If some target processor doesn't support it, or has limited ability to remember predictions, or mispredicts, then the code will be slower.

That being said, I'm happy with the patch.   You have a +1 from me.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue9915>
_______________________________________


More information about the Python-bugs-list mailing list