Skip to content
Permalink
master
Switch branches/tags
Go to file
 
 
Cannot retrieve contributors at this time
require 'benchmark/ips'
require 'time'
STRING = '2018-03-21T11:26:50Z'.freeze
def fast
Time.iso8601(STRING)
end
def slow
Time.parse(STRING)
end
Benchmark.ips do |x|
x.report('Time.iso8601') { fast }
x.report('Time.parse') { slow }
x.compare!
end