Sha256: 7257ffe986480d270d8516303e8f295f01675ab831f4405536dde74a9670f0ac

Contents?: true

Size: 439 Bytes

Versions: 30

Compression:

Stored size: 439 Bytes

Contents

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

require_relative 'setup'

regular = Country.first
compact = Compact::Country.first


puts "=== record.attribute ==="
Benchmark.ips do |x|
  x.report('regular') { regular.name }
  x.report('compact') { compact.name }
  x.compare!
end

puts "=== record[:attribute] ==="
Benchmark.ips do |x|
  x.report('regular') { regular[:name] }
  x.report('compact') { compact[:name] }
  x.compare!
end

Version data entries

30 entries across 30 versions & 1 rubygems

Version Path
frozen_record-0.21.0 benchmark/attribute-read
frozen_record-0.20.1 benchmark/attribute-read
frozen_record-0.20.0 benchmark/attribute-read
frozen_record-0.19.5 benchmark/attribute-read
frozen_record-0.19.4 benchmark/attribute-read
frozen_record-0.19.3 benchmark/attribute-read
frozen_record-0.19.2 benchmark/attribute-read
frozen_record-0.19.1 benchmark/attribute-read
frozen_record-0.19.0 benchmark/attribute-read
frozen_record-0.18.0 benchmark/attribute-read