summaryrefslogtreecommitdiff
path: root/benchmark/hash_shift.yml
blob: 954c1eb6feaea1095e154bfc04c0b16f782422b9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
benchmark:
  hash_shift: |
    h = {}

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

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