Skip to content

Commit

Permalink
bm_hash_to_proc.rb
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
nobu committed Nov 10, 2015
1 parent b935a13 commit a56b0f8
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions benchmark/bm_hash_to_proc.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
h = {}

10000.times do |i|
h[i] = nil
end

5000.times do |i|
[i].map(&h)
end

0 comments on commit a56b0f8

Please sign in to comment.