public
Rubygem
Description: Merb Core: All you need. None you don't.
Homepage: http://www.merbivore.com
Clone URL: git://github.com/wycats/merb-core.git
merb-core / simple_benches / instantiate.rb
100644 10 lines (7 sloc) 0.212 kb
1
2
3
4
5
6
7
8
9
10
require 'benchmark'
require 'zlib'
 
TIMES = (ARGV[0] || 100_000).to_i
 
Benchmark.bmbm do |x|
  x.report("instantiate") { TIMES.times { [1,2] }}
  x.report("zlib") { TIMES.times { 1.object_id + 2.object_id }}
end