2009-08-12から1日間の記事一覧
http://kaosf.kirara.st/sb/log/eid239.html require 'benchmark' n = 1000_000 a = (0..n).to_a b = (0..n).to_a Benchmark.bm do |x| x.report { a.sort_by{ rand } } x.report { b.shuffle } end ruby 1.9.1 user system total real 6.485000 0.000000 6.…