From 5fe61394e33fd0fbfdea170fbd4ea4f913e13cd1 Mon Sep 17 00:00:00 2001 From: k0kubun Date: Sun, 8 Jul 2018 17:03:23 +0000 Subject: 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 --- benchmark/vm2_struct_small_hset.yml | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'benchmark/vm2_struct_small_hset.yml') diff --git a/benchmark/vm2_struct_small_hset.yml b/benchmark/vm2_struct_small_hset.yml index 8c02b22994..edfde8b429 100644 --- a/benchmark/vm2_struct_small_hset.yml +++ b/benchmark/vm2_struct_small_hset.yml @@ -1,10 +1,8 @@ +prelude: | + s = Struct.new(:a, :b, :c) + x = s.new benchmark: - vm2_struct_small_hset: | - s = Struct.new(:a, :b, :c) - x = s.new - i = 0 - while i<6_000_000 # benchmark loop 2 - i += 1 - x[:a] = 1 - end -loop_count: 1 + vm2_struct_small_hset: 'x[:a] = 1 + +' +loop_count: 6000000 -- cgit v1.2.3