Skip to content

Instantly share code, notes, and snippets.

@amontalenti
Created January 15, 2012 01:14
Show Gist options
  • Save amontalenti/1613742 to your computer and use it in GitHub Desktop.
Save amontalenti/1613742 to your computer and use it in GitHub Desktop.
better microbenchmark for pypy
def fib(n):
if n <= 1:
return n
else:
return fib(n-1) + fib(n-2)
def main():
for i in xrange(36):
print "n=%d => %d" % (i, fib(i))
if __name__ == "__main__":
main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment