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:
parent
b935a13ba5
commit
a56b0f8b29
1 changed files with 9 additions and 0 deletions
9
benchmark/bm_hash_to_proc.rb
Normal file
9
benchmark/bm_hash_to_proc.rb
Normal file
|
@ -0,0 +1,9 @@
|
|||
h = {}
|
||||
|
||||
10000.times do |i|
|
||||
h[i] = nil
|
||||
end
|
||||
|
||||
5000.times do |i|
|
||||
[i].map(&h)
|
||||
end
|
Loading…
Reference in a new issue