Sha256: 80a79ddbc05cbcf8c3ddb24e2cb6b357d169546875842f8a5065062408f2983c

Contents?: true

Size: 501 Bytes

Versions: 47

Compression:

Stored size: 501 Bytes

Contents

Benchmark.ips do |x|
  obj = Object.new
  x.report("numeric statement") do
    case 1
    when 4 then 4
    when 3 then 3
    when 2 then 2
    when 1 then 1
    end
    nil
  end
  x.report("statement") do
    case 1
    when 4 then 4
    when 3 then 3
    when 2 then 2
    when obj then :obj
    when 1 then 1
    end
    nil
  end
  x.report("expression") do
    case 1
    when 4 then 4
    when 3 then 3
    when 2 then 2
    when obj then :obj
    when 1 then 1
    end
  end

  x.compare!
end

Version data entries

47 entries across 47 versions & 1 rubygems

Version Path
opal-1.8.3.rc1 benchmark-ips/bm_case.rb
opal-1.8.2 benchmark-ips/bm_case.rb
opal-1.8.1 benchmark-ips/bm_case.rb
opal-1.8.0 benchmark-ips/bm_case.rb
opal-1.8.0.beta1 benchmark-ips/bm_case.rb
opal-1.7.4 benchmark-ips/bm_case.rb
opal-1.8.0.alpha1 benchmark-ips/bm_case.rb
opal-1.7.3 benchmark-ips/bm_case.rb
opal-1.7.2 benchmark-ips/bm_case.rb
opal-1.7.1 benchmark-ips/bm_case.rb
opal-1.7.0 benchmark-ips/bm_case.rb
opal-1.7.0.rc1 benchmark-ips/bm_case.rb
opal-1.6.1 benchmark-ips/bm_case.rb
opal-1.6.0 benchmark-ips/bm_case.rb
opal-1.6.0.rc1 benchmark-ips/bm_case.rb
opal-1.6.0.alpha1 benchmark-ips/bm_case.rb
opal-1.5.1 benchmark-ips/bm_case.rb
opal-1.5.0 benchmark-ips/bm_case.rb
opal-1.5.0.rc1 benchmark-ips/bm_case.rb
opal-1.4.1 benchmark-ips/bm_case.rb