Skip to content

Instantly share code, notes, and snippets.

@mirekfranc
Created May 7, 2015 01:41
Show Gist options
  • Save mirekfranc/a7931ef19f75a26e9363 to your computer and use it in GitHub Desktop.
Save mirekfranc/a7931ef19f75a26e9363 to your computer and use it in GitHub Desktop.
the power of just in time...
$ cat problem_05.py
n = 2520
while True:
for i in xrange (20, 0, -1):
if n % i != 0:
break
else:
print (n)
break
n += 1
$ time pypy problem_05.py
232792560
real 0m4.908s
user 0m4.896s
sys 0m0.013s
$ time python problem_05.py
232792560
real 1m59.493s
user 1m59.520s
sys 0m0.004s
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment