PASTEBIN
| #1 paste tool since 2002
create new paste
tools
api
archive
real-time
faq
PASTEBIN
create new paste
trending pastes
sign up
login
my settings
my profile
Public Pastes
u-z
3 sec ago
Searching results ...
4 sec ago
Untitled
4 sec ago
Untitled
CSS | 11 sec ago
How do I share my ...
12 sec ago
Untitled
18 sec ago
MS SQL: Use a stor...
18 sec ago
Untitled
22 sec ago
Untitled
By: a guest on Jan 28th, 2012 | syntax:
None
| size: 0.16 KB | hits: 14 | expires: Never
download
|
raw
|
embed
|
report abuse
Copied
require 'benchmark'
def deep(i)
if i >= 500
6000000.times do
1 + 1 + 1 + 1
end
else
deep(i + 1)
end
end
puts Benchmark.measure { deep(0) }
create a
new version
of this paste
RAW Paste Data
require 'benchmark' def deep(i) if i >= 500 6000000.times do 1 + 1 + 1 + 1 end else deep(i + 1) end end puts Benchmark.measure { deep(0) }