summaryrefslogtreecommitdiff
path: root/benchmark/hash_shift.yml
diff options
context:
space:
mode:
Diffstat (limited to 'benchmark/hash_shift.yml')
-rw-r--r--benchmark/hash_shift.yml13
1 files changed, 13 insertions, 0 deletions
diff --git a/benchmark/hash_shift.yml b/benchmark/hash_shift.yml
new file mode 100644
index 0000000..954c1eb
--- /dev/null
+++ b/benchmark/hash_shift.yml
@@ -0,0 +1,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