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

(0xff4000..0xffffff).each do |i|
  h[i] = nil
end

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