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.27.4 benchmark/attribute-read
frozen_record-0.27.3 benchmark/attribute-read
frozen_record-0.27.2 benchmark/attribute-read
frozen_record-0.27.1 benchmark/attribute-read
frozen_record-0.27.0 benchmark/attribute-read
frozen_record-0.26.2 benchmark/attribute-read
frozen_record-0.26.1 benchmark/attribute-read
frozen_record-0.26.0 benchmark/attribute-read
frozen_record-0.25.5 benchmark/attribute-read
frozen_record-0.25.4 benchmark/attribute-read
frozen_record-0.25.3 benchmark/attribute-read
frozen_record-0.25.2 benchmark/attribute-read
frozen_record-0.25.1 benchmark/attribute-read
frozen_record-0.25.0 benchmark/attribute-read
frozen_record-0.24.1 benchmark/attribute-read
frozen_record-0.23.0 benchmark/attribute-read
frozen_record-0.22.2 benchmark/attribute-read
frozen_record-0.22.1 benchmark/attribute-read
frozen_record-0.22.0 benchmark/attribute-read
frozen_record-0.21.1 benchmark/attribute-read