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
Sun May 11 14:17:29 -0700 2008
commit  af548c0808576118ffbb43468104146feb7acbf9
tree    4b1a608fd28f0ae9a47797745d96eaf4e4b94dbb
parent  714a73910a39bdb733116dacab301c61d38edf07 parent  f8df510045587cd49a78851c1c6fc17a0e333a7d
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