Skip to content

Instantly share code, notes, and snippets.

@jacobh
Created July 27, 2011 13:16
Show Gist options
  • Save jacobh/1109333 to your computer and use it in GitHub Desktop.
Save jacobh/1109333 to your computer and use it in GitHub Desktop.
PyPy & CPython speeds
jacob@debian:~/Projects/Euler$ time python 005.py
smallest number: 232792560
real 5m24.439s
user 5m24.200s
sys 0m0.220s
jacob@debian:~/Projects/Euler$ time pypy 005.py
smallest number: 232792560
real 0m8.739s
user 0m8.693s
sys 0m0.044s
n = 20
i = 1
t = n
while(t > 1):
if(i/t == i/float(t)):
t -= 1
if(i/t != i/float(t)):
t = n
i += 1
print 'smallest number: ', i
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment