Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- require 'benchmark'
- n = 5_000_000
- Benchmark.bm do |x|
- x.report { n.times do ; { "x" => 1, "y" => 2}; end }
- x.report { n.times do ; { 'x' => 1, 'y' => 2}; end }
- end
- # first
- # user system total real
- # 3.820000 0.100000 3.920000 ( 3.941016)
- # 3.710000 0.070000 3.780000 ( 3.798138)
- # second
- # user system total real
- # 3.530000 0.080000 3.610000 ( 3.618199)
- # 3.540000 0.080000 3.620000 ( 3.631045)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement