aboutsummaryrefslogtreecommitdiffstats
path: root/benchmark/hash_long.yml
diff options
context:
space:
mode:
authork0kubun <k0kubun@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-07-08 17:36:26 +0000
committerk0kubun <k0kubun@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-07-08 17:36:26 +0000
commit62284f736a6280eb17168b4d561add2e708ff0a9 (patch)
treed0dbe8fb5b5431a6447216dd31390962a8b521cc /benchmark/hash_long.yml
parent1f2a37876b322b749c475cd2f82f236be8dc6a48 (diff)
downloadruby-62284f736a6280eb17168b4d561add2e708ff0a9.tar.gz
benchmark/*.yml: convert from benchmark/bm_*.rb
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63900 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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 0000000000..33c0c38f49
--- /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