(Ruby1.9.3)
benchmark
require 'benchmark' puts Benchmark::CAPTION puts Benchmark.measure { puts [1,2,3,4,5].inject(:+) } #=> user system total real #=> 15 #=> 0.000000 0.000000 0.000000 ( 0.000015)
牌語備忘録 -pygo
(Ruby1.9.3)
require 'benchmark' puts Benchmark::CAPTION puts Benchmark.measure { puts [1,2,3,4,5].inject(:+) } #=> user system total real #=> 15 #=> 0.000000 0.000000 0.000000 ( 0.000015)