1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/benchmark/bm_hash_keys.rb
glass 2fbe9eacf7 * benchmark/bm_hash_flatten.rb: added. r43896 is about 4 times faster
than 2.0.0p353.

* benchmark/bm_hash_keys.rb: added. r43896 is about 5 times faster
  than 2.0.0p353.

* benchmark/bm_hash_values.rb: added. r43896 is about 5 times faster
  than 2.0.0p353.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43898 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-28 10:50:41 +00:00

9 lines
72 B
Ruby

h = {}
10000.times do |i|
h[i] = nil
end
5000.times do
h.keys
end