Skip to content

Instantly share code, notes, and snippets.

@pzgz
Created December 14, 2011 18:11
Show Gist options
  • Save pzgz/1477765 to your computer and use it in GitHub Desktop.
Save pzgz/1477765 to your computer and use it in GitHub Desktop.
Fibonacci Bench Testing
def fibonacci(n)
a,b = 0, 1
n.times do
a,b = b,a+b
end
b
end
puts fibonacci(40)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment