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
+13
View File
@@ -0,0 +1,13 @@
def fib(n)
if n < 2 then
n
else
fib(n - 1) + fib(n - 2)
end
end
start = Time.now
for i in 0...5
puts fib(30)
end
puts "elapsed: " + (Time.now - start).to_s