ruby--ruby/benchmark/hash_small4.rb

2 lines
52 B
Ruby

1000000.times.map{|i| a={}; 4.times{|j| a[j]=j}; a}