Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* before user system total real shift 1.410000 0.020000 1.430000 ( 0.778395) shift(10) 0.910000 0.040000 0.950000 ( 0.718543) shift(100) 1.830000 0.090000 1.920000 ( 1.379111) * after user system total real shift 1.410000 0.030000 1.440000 ( 0.778768) shift(10) 0.970000 0.030000 1.000000 ( 0.720666) shift(100) 1.190000 0.080000 1.270000 ( 0.890673) {{{ require 'benchmark' Benchmark.bm(10) do |x| x.report "shift" do 50.times do ary = ['obj'] * 100000 1000.times do ary.shift end end end x.report "shift(10)" do 50.times do ary = ['obj'] * 100000 1000.times do ary.shift(10) end end end x.report "shift(100)" do 50.times do ary = ['obj'] * 100000 1000.times do ary.shift(100) end end end end }}}
- Loading branch information