diff options
Diffstat (limited to 'benchmark')
-rw-r--r-- | benchmark/bm_hash_shift.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/benchmark/bm_hash_shift.rb b/benchmark/bm_hash_shift.rb new file mode 100644 index 0000000000..a645671a5b --- /dev/null +++ b/benchmark/bm_hash_shift.rb @@ -0,0 +1,10 @@ +h = {} + +10000.times do |i| + h[i] = nil +end + +50000.times do + k, v = h.shift + h[k] = v +end |