evanphx (owner)

Revisions

gist: 206259 Download_button fork
public
Public Clone URL: git://gist.github.com/206259.git
Embed All Files: show embed
Text #
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
def foo
  raise "you suck"
end
 
def bar(n=5, &block)
  block.call if n == 0
  bar(n-1, &block)
end
 
def doit
  bar { return }
end
 
require 'benchmark'
 
total = 100000
 
puts Benchmark.measure {
  total.times do
    doit
  end
}