1. 06 Jul, 2013 1 commit
    • Raymond Hettinger's avatar
      Speed-up deque indexing by changing the deque block length to a power of two. · de68e0cf
      Raymond Hettinger authored
      The division and modulo calculation in deque_item() can be compiled
      to fast bitwise operations when the BLOCKLEN is a power of two.
      
      Timing before:
      
       ~/cpython $ py -m timeit -r7 -s 'from collections import deque' -s 'd=deque(range(10))' 'd[5]'
      10000000 loops, best of 7: 0.0627 usec per loop
      
      Timing after:
      
      ~/cpython $ py -m timeit -r7 -s 'from collections import deque' -s 'd=deque(range(10))' 'd[5]'
      10000000 loops, best of 7: 0.0581 usec per loop
      de68e0cf
  2. 04 Jul, 2013 12 commits
  3. 03 Jul, 2013 4 commits
  4. 02 Jul, 2013 8 commits
  5. 01 Jul, 2013 15 commits