[issue4207] Remove backwards compatibility in _heapq for performance

Raymond Hettinger report at bugs.python.org
Sun Oct 26 14:07:46 CET 2008


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

The compatability code was just added in Py2.6 and is needed for apps
like Twisted that currently rely on __le__ being tested.  In 3.0, the
compatability code is removed and full speed is restored.

Also, the timing suite exaggerates the effect.  A more typical use of
heaps involves a heap of tuples with the first tuple element being used
as a priority level.  That increases the comparison time and decreases
the relative significance of the dispatch logic.

----------
assignee:  -> rhettinger
nosy: +rhettinger
resolution:  -> rejected
status: open -> closed

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


More information about the Python-bugs-list mailing list