1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

bm_hash_to_proc.rb

* benchmark/bm_hash_to_proc.rb: benchmark for Hash#to_proc.
  [Feature #11653]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52522 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2015-11-10 09:22:37 +00:00
parent b935a13ba5
commit a56b0f8b29

View file

@ -0,0 +1,9 @@
h = {}
10000.times do |i|
h[i] = nil
end
5000.times do |i|
[i].map(&h)
end