summaryrefslogtreecommitdiff
path: root/benchmark/hash_flatten.yml
diff options
context:
space:
mode:
Diffstat (limited to 'benchmark/hash_flatten.yml')
-rw-r--r--benchmark/hash_flatten.yml12
1 files changed, 12 insertions, 0 deletions
diff --git a/benchmark/hash_flatten.yml b/benchmark/hash_flatten.yml
new file mode 100644
index 0000000..0412388
--- /dev/null
+++ b/benchmark/hash_flatten.yml
@@ -0,0 +1,12 @@
+benchmark:
+ hash_flatten: |
+ h = {}
+
+ 10000.times do |i|
+ h[i] = nil
+ end
+
+ 1000.times do
+ h.flatten
+ end
+loop_count: 1