require 'benchmark'
require 'benchmark/ips'

Const = 1

Benchmark.ips do |x|
  x.report "const read", <<-CODE
    Const
  CODE
end

require 'benchmark'
require 'benchmark/ips'

Const = 1

Benchmark.ips do |x|
  x.report "const read" do |times|
    i = 0
    while i < times
      Const
      i += 1
    end
  end
end

Use loop style for const benchmark
Use loop style for const benchmark
