Skip to content

Instantly share code, notes, and snippets.

@thedarkone
Last active February 2, 2016 00:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thedarkone/ce54341db26ab1399a93 to your computer and use it in GitHub Desktop.
Save thedarkone/ce54341db26ab1399a93 to your computer and use it in GitHub Desktop.
def recur(n)
if n == 0
bench
else
recur(n-1)
end
end
def bench
loop do
start = Time.now
x = 0
1_000.times do
x += Integer("14x") rescue 14
end
puts x
puts Time.now - start
end
end
recur(80)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment