Sha256: 1b46ac936bee65e854ae1876b62e680b312e9869f8ec55b5de54729ad691fd7a

Contents?: true

Size: 191 Bytes

Versions: 70

Compression:

Stored size: 191 Bytes

Contents

h1 = {}
h2 = {}

a = []

1.upto(5_000) do |i|
  a[i] = Object.new
  h1[a[i]] = nil
end

2_501.upto(7_500) do |i|
  a[i] = Object.new
  h2[a[i]] = nil
end

1_000.times do
  h1.replace(h2)
end

Version data entries

70 entries across 70 versions & 2 rubygems

Version Path
opal-0.11.4 benchmark/bm_hash_replace_object.rb
opal-0.11.3 benchmark/bm_hash_replace_object.rb
opal-0.11.2 benchmark/bm_hash_replace_object.rb
opal-0.11.1 benchmark/bm_hash_replace_object.rb
opal-0.11.1.pre benchmark/bm_hash_replace_object.rb
opal-0.10.6 benchmark/bm_hash_replace_object.rb
opal-0.10.6.beta benchmark/bm_hash_replace_object.rb
opal-0.11.0 benchmark/bm_hash_replace_object.rb
opal-0.10.5 benchmark/bm_hash_replace_object.rb
opal-0.10.4 benchmark/bm_hash_replace_object.rb
opal-0.11.0.rc1 benchmark/bm_hash_replace_object.rb
opal-0.10.3 benchmark/bm_hash_replace_object.rb
opal-0.10.2 benchmark/bm_hash_replace_object.rb
opal-0.10.1 benchmark/bm_hash_replace_object.rb
opal-0.10.0 benchmark/bm_hash_replace_object.rb
opal-0.10.0.rc2 benchmark/bm_hash_replace_object.rb
opal-0.9.4 benchmark/bm_hash_replace_object.rb
opal-0.9.3 benchmark/bm_hash_replace_object.rb
opal-0.10.0.rc1 benchmark/bm_hash_replace_object.rb
opal-0.10.0.beta5 benchmark/bm_hash_replace_object.rb