ruby/benchmark/bm_hash_shift_u32.rb

11 строки
111 B
Ruby

h = {}
(0xffff4000..0xffffffff).each do |i|
h[i] = nil
end
300000.times do
k, v = h.shift
h[k] = v
end