Sha256: 50d0aafa39b080db8280523a45b563e74cb786ad912b69e2e3c0b4182ce577c6

Contents?: true

Size: 237 Bytes

Versions: 70

Compression:

Stored size: 237 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

500.times do
  h1.merge!(h2)
end

500.times do
  h2.merge!(h1){|k, v, v2| 42}
end

Version data entries

70 entries across 70 versions & 2 rubygems

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