diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-11-10 09:22:37 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-11-10 09:22:37 +0000 |
commit | 2f4c89a096d6901ba8417366fc702b3f7cd5f9fa (patch) | |
tree | 58617f53b8c050543560db5a974c8b1deab3b66e | |
parent | 529d0c4b766560b35dc5fa95375d1858fa5c77fb (diff) | |
download | ruby-2f4c89a096d6901ba8417366fc702b3f7cd5f9fa.tar.gz |
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
-rw-r--r-- | benchmark/bm_hash_to_proc.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/benchmark/bm_hash_to_proc.rb b/benchmark/bm_hash_to_proc.rb new file mode 100644 index 0000000000..2b675bf509 --- /dev/null +++ b/benchmark/bm_hash_to_proc.rb @@ -0,0 +1,9 @@ +h = {} + +10000.times do |i| + h[i] = nil +end + +5000.times do |i| + [i].map(&h) +end |