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

(0xffff4000..0xffffffff).each do |i|
  h[i] = nil
end

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