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