Skip to content

Instantly share code, notes, and snippets.

@lgw4
Last active December 17, 2015 22:49
Show Gist options
  • Select an option

  • Save lgw4/5685192 to your computer and use it in GitHub Desktop.

Select an option

Save lgw4/5685192 to your computer and use it in GitHub Desktop.
ipython %timeit PyPy
In [1]: import sys
In [2]: print sys.version
2.7.3 (5acfe049a5b0, May 21 2013, 13:47:22)
[PyPy 2.0.2 with GCC 4.2.1 Compatible Apple LLVM 4.2 (clang-425.0.28)]
In [3]: %timeit exes = [x for x in range(1000000)]
100 loops, best of 3: 16.3 ms per loop
In [4]: %timeit exes = [x for x in xrange(1000000)]
100 loops, best of 3: 14.1 ms per loop
Compiler time: 549755.81 s
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment