summaryrefslogtreecommitdiff
path: root/benchmark/hash_long.yml
diff options
context:
space:
mode:
Diffstat (limited to 'benchmark/hash_long.yml')
-rw-r--r--benchmark/hash_long.yml7
1 files changed, 7 insertions, 0 deletions
diff --git a/benchmark/hash_long.yml b/benchmark/hash_long.yml
new file mode 100644
index 0000000..33c0c38
--- /dev/null
+++ b/benchmark/hash_long.yml
@@ -0,0 +1,7 @@
+benchmark:
+ hash_long: |
+ k1 = "Ping Pong Ping Pong Ping Pong Ping Pong Ping Pong Ping Pong Ping Pong Ping Pong Ping Pong Ping Pong";
+ k2 = "Pong Ping Pong Ping Pong Ping Pong Ping Pong Ping Pong Ping Pong Ping Pong Ping Pong Ping Pong Ping";
+ h = {k1 => 0, k2 => 0};
+ 3000000.times{|i| k = i % 2 ? k2 : k1; h [k] = h[k] + 1}
+loop_count: 1