summaryrefslogtreecommitdiff
path: root/benchmark/bm_hash_ident_sym.rb
blob: 4c81e3d28e2903474b2c99ef3d1aaa7d520bf142 (plain)
1
2
3
4
h = {}.compare_by_identity
syms = ('a'..'z').to_a.map(&:to_sym)
syms.each { |s| h[s] = s }
200_000.times { syms.each { |s| h[s] } }