4 bm.report("100k rescue with no raise") do
5 100_000.times { begin; rescue; end }
8 bm.report("100k rescue with raise") do
9 100_000.times { begin; raise; rescue; end }
12 bm.report("100k inline rescue") do
13 100_000.times { raise rescue nil }
16 bm.report("100k missing method with raise") do
17 100_000.times { __NOMETHOD__ rescue nil }
22 Benchmark.bmbm(40) {|bm| bench_rescue(bm)}