summaryrefslogtreecommitdiff
path: root/benchmark/hash_shift_u32.yml
diff options
context:
space:
mode:
Diffstat (limited to 'benchmark/hash_shift_u32.yml')
-rw-r--r--benchmark/hash_shift_u32.yml13
1 files changed, 13 insertions, 0 deletions
diff --git a/benchmark/hash_shift_u32.yml b/benchmark/hash_shift_u32.yml
new file mode 100644
index 0000000..96e9753
--- /dev/null
+++ b/benchmark/hash_shift_u32.yml
@@ -0,0 +1,13 @@
+benchmark:
+ hash_shift_u32: |
+ h = {}
+
+ (0xffff4000..0xffffffff).each do |i|
+ h[i] = nil
+ end
+
+ 300000.times do
+ k, v = h.shift
+ h[k] = v
+ end
+loop_count: 1