diff options
Diffstat (limited to 'benchmark/hash_aref_str.rb')
-rw-r--r-- | benchmark/hash_aref_str.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/benchmark/hash_aref_str.rb b/benchmark/hash_aref_str.rb new file mode 100644 index 0000000000..19439b061b --- /dev/null +++ b/benchmark/hash_aref_str.rb @@ -0,0 +1,4 @@ +h = {} +strs = ('a'..'z').to_a.map!(&:freeze) +strs.each { |s| h[s] = s } +200_000.times { strs.each { |s| h[s] } } |