summaryrefslogtreecommitdiffstats
path: root/Include/pymem.h
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2013-06-23 22:44:33 (GMT)
committerRaymond Hettinger <python@rcn.com>2013-06-23 22:44:33 (GMT)
commit20b0f87e1d031390f5b65e28b0026c42f53abe5d (patch)
treef1533ee0855304601ce77d71a767a217966f31bb /Include/pymem.h
parent1ce46d99dbe13e57544e404966c57072d1dcf8e1 (diff)
downloadcpython-20b0f87e1d031390f5b65e28b0026c42f53abe5d.zip
cpython-20b0f87e1d031390f5b65e28b0026c42f53abe5d.tar.gz
cpython-20b0f87e1d031390f5b65e28b0026c42f53abe5d.tar.bz2
Misc improvements to collections.deque()
* Clarified comment on the impact of BLOCKLEN on deque_index (with a power-of-two, the division and modulo computations are done with a right-shift and bitwise-and). * Clarified comment on the overflow check to note that it is general and not just applicable the 64-bit builds. * In deque._rotate(), the "deque->" indirections are factored-out of the loop (loop invariant code motion), leaving the code cleaner looking and slightly faster. * In deque._rotate(), replaced the memcpy() with an equivalent loop. That saved the memcpy setup time and allowed the pointers to move in their natural leftward and rightward directions. See comparative timings at: http://pastebin.com/p0RJnT5N
Diffstat (limited to 'Include/pymem.h')
0 files changed, 0 insertions, 0 deletions