[issue16398] deque.rotate() could be much faster
Raymond Hettinger
report at bugs.python.org
Fri Jan 11 23:43:46 CET 2013
Raymond Hettinger added the comment:
The easiest change would essentially involve inlining the code for append/appendleft and then removing unneeded steps (the state update, the INCREF/DECREF of item, and the TRIM() test).
Of these, the INCREF/DECREF is likely to be a nice win because we can rotate without visiting all the underlying objects (each of which would likely be a cache-line miss).
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue16398>
_______________________________________
More information about the Python-bugs-list
mailing list