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_to_proc.rb
nobu a56b0f8b29 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
2015-11-10 09:22:37 +00:00

9 lines
81 B
Ruby

h = {}
10000.times do |i|
h[i] = nil
end
5000.times do |i|
[i].map(&h)
end