Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Baseline
- --------
- ~/py27 $ py27 -m timeit -s "from collections import deque" -s "d=deque(range(100))" -s "r=d.rotate" "r(1)"
- 1000000 loops, best of 3: 0.288 usec per loop
- ~/py27 $ py27 -m timeit -s "from collections import deque" -s "d=deque(range(100))" -s "r=d.rotate" "r(1)"
- 1000000 loops, best of 3: 0.284 usec per loop
- ~/py27 $ py27 -m timeit -s "from collections import deque" -s "d=deque(range(100))" -s "r=d.rotate" "r(20)"
- 1000000 loops, best of 3: 0.344 usec per loop
- ~/py27 $ py27 -m timeit -s "from collections import deque" -s "d=deque(range(100))" -s "r=d.rotate" "r(20)"
- 1000000 loops, best of 3: 0.369 usec per loop
- ~/py27 $ py27 -m timeit -s "from collections import deque" -s "d=deque(range(100))" -s "r=d.rotate" "r(20)"
- 1000000 loops, best of 3: 0.373 usec per loop
- ~/py27 $ py27 -m timeit -s "from collections import deque" -s "d=deque(range(100))" -s "r=d.rotate" "r(50)"
- 1000000 loops, best of 3: 0.418 usec per loop
- ~/py27 $ py27 -m timeit -s "from collections import deque" -s "d=deque(range(100))" -s "r=d.rotate" "r(50)"
- 1000000 loops, best of 3: 0.423 usec per loop
- ~/py27 $
- ~/py27 $
- ~/py27 $ py27 -m timeit -s "from collections import deque" -s "d=deque(range(1000))" -s "r=d.rotate" "r(1)"
- 1000000 loops, best of 3: 0.27 usec per loop
- ~/py27 $ py27 -m timeit -s "from collections import deque" -s "d=deque(range(1000))" -s "r=d.rotate" "r(1)"
- 1000000 loops, best of 3: 0.292 usec per loop
- ~/py27 $ py27 -m timeit -s "from collections import deque" -s "d=deque(range(1000))" -s "r=d.rotate" "r(20)"
- 1000000 loops, best of 3: 0.367 usec per loop
- ~/py27 $ py27 -m timeit -s "from collections import deque" -s "d=deque(range(1000))" -s "r=d.rotate" "r(20)"
- 1000000 loops, best of 3: 0.375 usec per loop
- ~/py27 $ py27 -m timeit -s "from collections import deque" -s "d=deque(range(1000))" -s "r=d.rotate" "r(50)"
- 1000000 loops, best of 3: 0.451 usec per loop
- ~/py27 $ py27 -m timeit -s "from collections import deque" -s "d=deque(range(1000))" -s "r=d.rotate" "r(50)"
- 1000000 loops, best of 3: 0.46 usec per loop
- ~/py27 $
- ~/py27 $ py27 -m timeit -s "from collections import deque" -s "d=deque(range(1000000))" -s "r=d.rotate" "r(1)"
- 1000000 loops, best of 3: 0.297 usec per loop
- ~/py27 $ py27 -m timeit -s "from collections import deque" -s "d=deque(range(1000000))" -s "r=d.rotate" "r(1)"
- 1000000 loops, best of 3: 0.302 usec per loop
- ~/py27 $ py27 -m timeit -s "from collections import deque" -s "d=deque(range(1000000))" -s "r=d.rotate" "r(20)"
- 1000000 loops, best of 3: 0.424 usec per loop
- ~/py27 $ py27 -m timeit -s "from collections import deque" -s "d=deque(range(1000000))" -s "r=d.rotate" "r(20)"
- 1000000 loops, best of 3: 0.409 usec per loop
- ~/py27 $ py27 -m timeit -s "from collections import deque" -s "d=deque(range(1000000))" -s "r=d.rotate" "r(50)"
- 1000000 loops, best of 3: 0.572 usec per loop
- ~/py27 $ py27 -m timeit -s "from collections import deque" -s "d=deque(range(1000000))" -s "r=d.rotate" "r(50)"
- 1000000 loops, best of 3: 0.588 usec per loop
- ~/py27 $ py27 -m timeit -s "from collections import deque" -s "d=deque(range(1000000))" -s "r=d.rotate" "r(1000)"
- 100000 loops, best of 3: 5.73 usec per loop
- ~/py27 $ py27 -m timeit -s "from collections import deque" -s "d=deque(range(1000000))" -s "r=d.rotate" "r(1000)"
- 100000 loops, best of 3: 5.72 usec per loop
- Remove struct indirections
- ==========================
- ~/py27 $ py27 -m timeit -s "from collections import deque" -s "d=deque(range(100))" -s "r=d.rotate" "r(1)"
- 1000000 loops, best of 3: 0.283 usec per loop
- ~/py27 $ py27 -m timeit -s "from collections import deque" -s "d=deque(range(100))" -s "r=d.rotate" "r(1)"
- 1000000 loops, best of 3: 0.282 usec per loop
- ~/py27 $ py27 -m timeit -s "from collections import deque" -s "d=deque(range(100))" -s "r=d.rotate" "r(20)"
- 1000000 loops, best of 3: 0.367 usec per loop
- ~/py27 $ py27 -m timeit -s "from collections import deque" -s "d=deque(range(100))" -s "r=d.rotate" "r(20)"
- 1000000 loops, best of 3: 0.366 usec per loop
- ~/py27 $ py27 -m timeit -s "from collections import deque" -s "d=deque(range(100))" -s "r=d.rotate" "r(50)"
- 1000000 loops, best of 3: 0.433 usec per loop
- ~/py27 $ py27 -m timeit -s "from collections import deque" -s "d=deque(range(100))" -s "r=d.rotate" "r(50)"
- 1000000 loops, best of 3: 0.435 usec per loop
- ~/py27 $
- ~/py27 $ py27 -m timeit -s "from collections import deque" -s "d=deque(range(1000))" -s "r=d.rotate" "r(1)"
- 1000000 loops, best of 3: 0.289 usec per loop
- ~/py27 $ py27 -m timeit -s "from collections import deque" -s "d=deque(range(1000))" -s "r=d.rotate" "r(1)"
- 1000000 loops, best of 3: 0.291 usec per loop
- ~/py27 $ py27 -m timeit -s "from collections import deque" -s "d=deque(range(1000))" -s "r=d.rotate" "r(20)"
- 1000000 loops, best of 3: 0.371 usec per loop
- ~/py27 $ py27 -m timeit -s "from collections import deque" -s "d=deque(range(1000))" -s "r=d.rotate" "r(20)"
- 1000000 loops, best of 3: 0.366 usec per loop
- ~/py27 $ py27 -m timeit -s "from collections import deque" -s "d=deque(range(1000))" -s "r=d.rotate" "r(50)"
- 1000000 loops, best of 3: 0.442 usec per loop
- ~/py27 $ py27 -m timeit -s "from collections import deque" -s "d=deque(range(1000))" -s "r=d.rotate" "r(50)"
- 1000000 loops, best of 3: 0.438 usec per loop
- ~/py27 $ py27 -m timeit -s "from collections import deque" -s "d=deque(range(1000000))" -s "r=d.rotate" "r(1)"
- 1000000 loops, best of 3: 0.287 usec per loop
- ~/py27 $ py27 -m timeit -s "from collections import deque" -s "d=deque(range(1000000))" -s "r=d.rotate" "r(1)"
- 1000000 loops, best of 3: 0.293 usec per loop
- ~/py27 $ py27 -m timeit -s "from collections import deque" -s "d=deque(range(1000000))" -s "r=d.rotate" "r(20)"
- 1000000 loops, best of 3: 0.42 usec per loop
- ~/py27 $ py27 -m timeit -s "from collections import deque" -s "d=deque(range(1000000))" -s "r=d.rotate" "r(20)"
- 1000000 loops, best of 3: 0.418 usec per loop
- ~/py27 $ py27 -m timeit -s "from collections import deque" -s "d=deque(range(1000000))" -s "r=d.rotate" "r(50)"
- 1000000 loops, best of 3: 0.596 usec per loop
- ~/py27 $ py27 -m timeit -s "from collections import deque" -s "d=deque(range(1000000))" -s "r=d.rotate" "r(50)"
- 1000000 loops, best of 3: 0.599 usec per loop
- ~/py27 $ py27 -m timeit -s "from collections import deque" -s "d=deque(range(1000000))" -s "r=d.rotate" "r(1000)"
- 100000 loops, best of 3: 5.68 usec per loop
- ~/py27 $ py27 -m timeit -s "from collections import deque" -s "d=deque(range(1000000))" -s "r=d.rotate" "r(1000)"
- 100000 loops, best of 3: 5.68 usec per loop
- =Replace memcpy=====================================
- ~/py27 $ py27 -m timeit -s "from collections import deque" -s "d=deque(range(1000))" -s "r=d.rotate" "r(1)"
- 1000000 loops, best of 3: 0.27 usec per loop
- ~/py27 $ py27 -m timeit -s "from collections import deque" -s "d=deque(range(100))" -s "r=d.rotate" "r(1)"
- 1000000 loops, best of 3: 0.28 usec per loop
- ~/py27 $ py27 -m timeit -s "from collections import deque" -s "d=deque(range(100))" -s "r=d.rotate" "r(1)"
- 1000000 loops, best of 3: 0.279 usec per loop
- ~/py27 $ py27 -m timeit -s "from collections import deque" -s "d=deque(range(100))" -s "r=d.rotate" "r(20)"
- 1000000 loops, best of 3: 0.32 usec per loop
- ~/py27 $ py27 -m timeit -s "from collections import deque" -s "d=deque(range(100))" -s "r=d.rotate" "r(20)"
- 1000000 loops, best of 3: 0.317 usec per loop
- ~/py27 $ py27 -m timeit -s "from collections import deque" -s "d=deque(range(100))" -s "r=d.rotate" "r(50)"
- 1000000 loops, best of 3: 0.375 usec per loop
- ~/py27 $ py27 -m timeit -s "from collections import deque" -s "d=deque(range(100))" -s "r=d.rotate" "r(50)"
- 1000000 loops, best of 3: 0.375 usec per loop
- ~/py27 $ py27 -m timeit -s "from collections import deque" -s "d=deque(range(1000))" -s "r=d.rotate" "r(1)"
- 1000000 loops, best of 3: 0.289 usec per loop
- ~/py27 $ py27 -m timeit -s "from collections import deque" -s "d=deque(range(1000))" -s "r=d.rotate" "r(1)"
- 1000000 loops, best of 3: 0.294 usec per loop
- ~/py27 $ py27 -m timeit -s "from collections import deque" -s "d=deque(range(1000))" -s "r=d.rotate" "r(20)"
- 1000000 loops, best of 3: 0.323 usec per loop
- ~/py27 $ py27 -m timeit -s "from collections import deque" -s "d=deque(range(1000))" -s "r=d.rotate" "r(20)"
- 1000000 loops, best of 3: 0.327 usec per loop
- ~/py27 $ py27 -m timeit -s "from collections import deque" -s "d=deque(range(1000))" -s "r=d.rotate" "r(50)"
- 1000000 loops, best of 3: 0.377 usec per loop
- ~/py27 $ py27 -m timeit -s "from collections import deque" -s "d=deque(range(1000))" -s "r=d.rotate" "r(50)"
- 1000000 loops, best of 3: 0.377 usec per loop
- ~/py27 $ py27 -m timeit -s "from collections import deque" -s "d=deque(range(1000000))" -s "r=d.rotate" "r(1)"
- 1000000 loops, best of 3: 0.288 usec per loop
- ~/py27 $ py27 -m timeit -s "from collections import deque" -s "d=deque(range(1000000))" -s "r=d.rotate" "r(20)"
- 1000000 loops, best of 3: 0.384 usec per loop
- ~/py27 $ py27 -m timeit -s "from collections import deque" -s "d=deque(range(1000000))" -s "r=d.rotate" "r(20)"
- 1000000 loops, best of 3: 0.387 usec per loop
- ~/py27 $ py27 -m timeit -s "from collections import deque" -s "d=deque(range(1000000))" -s "r=d.rotate" "r(50)"
- 1000000 loops, best of 3: 0.562 usec per loop
- ~/py27 $ py27 -m timeit -s "from collections import deque" -s "d=deque(range(1000000))" -s "r=d.rotate" "r(50)"
- 1000000 loops, best of 3: 0.569 usec per loop
- ~/py27 $ py27 -m timeit -s "from collections import deque" -s "d=deque(range(1000000))" -s "r=d.rotate" "r(1000)"
- 100000 loops, best of 3: 5.47 usec per loop
- ~/py27 $ py27 -m timeit -s "from collections import deque" -s "d=deque(range(1000000))" -s "r=d.rotate" "r(1000)"
- 100000 loops, best of 3: 5.47 usec per loop
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement