aboutsummaryrefslogtreecommitdiffstats
path: root/benchmark/vm2_struct_small_aref.yml
diff options
context:
space:
mode:
authork0kubun <k0kubun@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-07-08 17:03:23 +0000
committerk0kubun <k0kubun@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-07-08 17:03:23 +0000
commit5fe61394e33fd0fbfdea170fbd4ea4f913e13cd1 (patch)
treed62bc1f1849ef9d5c9abd2c58d0ababde219f2b5 /benchmark/vm2_struct_small_aref.yml
parent3016b8fb4df11dd9739382135ef8662fd63a5eaa (diff)
downloadruby-5fe61394e33fd0fbfdea170fbd4ea4f913e13cd1.tar.gz
benchmark/vm2_*.yml: abstract away the while loop
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63896 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'benchmark/vm2_struct_small_aref.yml')
-rw-r--r--benchmark/vm2_struct_small_aref.yml16
1 files changed, 7 insertions, 9 deletions
diff --git a/benchmark/vm2_struct_small_aref.yml b/benchmark/vm2_struct_small_aref.yml
index 57e3d6aa08..22cd919735 100644
--- a/benchmark/vm2_struct_small_aref.yml
+++ b/benchmark/vm2_struct_small_aref.yml
@@ -1,10 +1,8 @@
+prelude: |
+ s = Struct.new(:a, :b, :c)
+ x = s.new
benchmark:
- vm2_struct_small_aref: |
- s = Struct.new(:a, :b, :c)
- x = s.new
- i = 0
- while i<6_000_000 # benchmark loop 2
- i += 1
- x.a
- end
-loop_count: 1
+ vm2_struct_small_aref: 'x.a
+
+'
+loop_count: 6000000