summaryrefslogtreecommitdiff
path: root/benchmark/hash_shift_u24.rb
diff options
context:
space:
mode:
Diffstat (limited to 'benchmark/hash_shift_u24.rb')
-rw-r--r--benchmark/hash_shift_u24.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/benchmark/hash_shift_u24.rb b/benchmark/hash_shift_u24.rb
new file mode 100644
index 0000000000..de4e0fa696
--- /dev/null
+++ b/benchmark/hash_shift_u24.rb
@@ -0,0 +1,10 @@
+h = {}
+
+(0xff4000..0xffffff).each do |i|
+ h[i] = nil
+end
+
+300000.times do
+ k, v = h.shift
+ h[k] = v
+end