summaryrefslogtreecommitdiff
path: root/benchmark/hash_shift.rb
blob: a645671a5bfe42b85bc3407c0b5d074ffb1d1ea4 (plain)
1
2
3
4
5
6
7
8
9
10
h = {}

10000.times do |i|
  h[i] = nil
end

50000.times do
  k, v = h.shift
  h[k] = v
end