Closed mururu closed 9 years ago
benchmark results
require 'benchmark'
require 'strptime'
pr = Strptime.new("%d/%b/%Y %H:%M:%S")
Benchmark.bm 10 do |r|
r.report "result" do
5000000.times{ pr.exec("28/Feb/2013 12:00:00") }
end
end
master
$ bundle exec ruby bench.rb
user system total real
result 4.910000 0.020000 4.930000 ( 5.046398)
no cache
$ bundle exec ruby bench.rb
user system total real
result 8.220000 0.030000 8.250000 ( 8.421462)
cache
$ bundle exec ruby bench.rb
user system total real
result 4.980000 0.010000 4.990000 ( 5.003196)
Great! thanks!!
Thank you!!
Closes #3
Time.strptime
but notDateTime.strptime
.