summaryrefslogtreecommitdiff
path: root/benchmark/hash_aref_dsym.rb
diff options
context:
space:
mode:
Diffstat (limited to 'benchmark/hash_aref_dsym.rb')
-rw-r--r--benchmark/hash_aref_dsym.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/benchmark/hash_aref_dsym.rb b/benchmark/hash_aref_dsym.rb
new file mode 100644
index 0000000000..af4f8c36d4
--- /dev/null
+++ b/benchmark/hash_aref_dsym.rb
@@ -0,0 +1,4 @@
+h = {}
+syms = ('a'..'z').map { |s| s.to_sym }
+syms.each { |s| h[s] = 1 }
+200_000.times { syms.each { |s| h[s] } }