Sha256: cc2ba9ae7e536852f53f636e1245401e57c56d37fbe3b8a3e8be9a7f8aad444b

Contents?: true

Size: 448 Bytes

Versions: 26

Compression:

Stored size: 448 Bytes

Contents

#!/usr/bin/env ruby
# frozen_string_literal: true

require_relative '../lib/jekyll'
require 'benchmark/ips'

date = '2014-08-02 14:43:06 PDT'
time = Time.parse(date)

Benchmark.ips do |x|
  x.report('Time.parse') do
    Time.parse(date)
  end

  x.report('localtime') do
    Time.parse(date).localtime
  end

  x.report('localtime parsed') do
    time.localtime
  end

  x.report('Utils.parse_date') do
    Jekyll::Utils.parse_date(date)
  end
end

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
lbenicio-minimal-v1-1.6.4 benchmark/parse-date
lbenicio-minimal-v1-1.6.3 benchmark/parse-date
lbenicio-minimal-v1-1.6.2 benchmark/parse-date
lbenicio-minimal-v1-1.6.1 benchmark/parse-date
lbenicio-minimal-v1-1.5.3 benchmark/parse-date
lbenicio-minimal-v1-1.5.2 benchmark/parse-date
lbenicio-minimal-v1-1.5.0 benchmark/parse-date
lbenicio-minimal-v1-1.4.0 benchmark/parse-date
lbenicio-minimal-v1-1.3.3 benchmark/parse-date
lbenicio-minimal-v1-1.3.2 benchmark/parse-date
lbenicio-minimal-v1-1.3.1 benchmark/parse-date
lbenicio-minimal-v1-1.3.0 benchmark/parse-date
lbenicio-minimal-v1-1.2.1 benchmark/parse-date
lbenicio-minimal-v1-1.2.0 benchmark/parse-date
lbenicio-minimal-v1-1.1.9 benchmark/parse-date
lbenicio-minimal-v1-1.1.8 benchmark/parse-date
lbenicio-minimal-v1-1.1.7 benchmark/parse-date
lbenicio-minimal-v1-1.1.6 benchmark/parse-date
lbenicio-minimal-v1-1.1.5 benchmark/parse-date
lbenicio-minimal-v1-1.1.4 benchmark/parse-date