• Raymond Hettinger's avatar
    Misc improvements to collections.deque() · 20b0f87e
    Raymond Hettinger yazdı
    * 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
    20b0f87e
Adı
Son kayıt (commit)
Son güncelleme
Doc Loading commit data...
Grammar Loading commit data...
Include Loading commit data...
Lib Loading commit data...
Mac Loading commit data...
Misc Loading commit data...
Modules Loading commit data...
Objects Loading commit data...
PC Loading commit data...
PCbuild Loading commit data...
Parser Loading commit data...
Python Loading commit data...
Tools Loading commit data...
.bzrignore Loading commit data...
.gitignore Loading commit data...
.hgeol Loading commit data...
.hgignore Loading commit data...
.hgtags Loading commit data...
.hgtouch Loading commit data...
LICENSE Loading commit data...
Makefile.pre.in Loading commit data...
README Loading commit data...
config.guess Loading commit data...
config.sub Loading commit data...
configure Loading commit data...
configure.ac Loading commit data...
install-sh Loading commit data...
pyconfig.h.in Loading commit data...
setup.py Loading commit data...