2009-02-21から1日間の記事一覧
Ruby has some division method but I don't know that the fastest one. I wanna know that.I did the benchmark as bellow, require 'benchmark' aset = (1..1000).to_a Benchmark.bmbm do |x| x.report('/') { aset.each_cons(2) {|x, y| y./ x.to_f } } …