Get a basic benchmark runner going.

This commit is contained in:
Bob Nystrom
2013-11-22 08:55:22 -08:00
parent d19f9f1b9b
commit b30c30e1e3
7 changed files with 112 additions and 7 deletions
+6 -1
View File
@@ -1,5 +1,10 @@
import time
def fib(n):
if n < 2: return n
return fib(n - 1) + fib(n - 2)
print fib(35)
start = time.clock()
for i in range(0, 5):
print(fib(30))
print("elapsed: " + str(time.clock() - start))