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
fabien (author)
Sun May 11 12:48:20 -0700 2008
commit  ef14f310e859489b2681d3da3198a37d322541c9
tree    c2f078a582c64371e0d4ce1ebc2d685ffbc18ad8
parent  4640df45006b4f0be2dccf45ff970d12762e364b
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