ruby-changes:51682
From: k0kubun <ko1@a...>
Date: Mon, 9 Jul 2018 01:35:50 +0900 (JST)
Subject: [ruby-changes:51682] k0kubun:r63894 (trunk): benchmark/vm1_*.yml: manual fixes for ugly conversions
k0kubun 2018-07-09 01:35:44 +0900 (Mon, 09 Jul 2018) New Revision: 63894 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=63894 Log: benchmark/vm1_*.yml: manual fixes for ugly conversions Modified files: trunk/benchmark/vm1_blockparam.yml trunk/benchmark/vm1_blockparam_call.yml trunk/benchmark/vm1_blockparam_pass.yml trunk/benchmark/vm1_blockparam_yield.yml trunk/benchmark/vm1_const.yml trunk/benchmark/vm1_lvar_init.yml trunk/benchmark/vm1_lvar_set.yml trunk/benchmark/vm1_simplereturn.yml trunk/benchmark/vm1_swap.yml Index: benchmark/vm1_blockparam.yml =================================================================== --- benchmark/vm1_blockparam.yml (revision 63893) +++ benchmark/vm1_blockparam.yml (revision 63894) @@ -2,7 +2,6 @@ prelude: | https://github.com/ruby/ruby/blob/trunk/benchmark/vm1_blockparam.yml#L2 def m &b end benchmark: - vm1_blockparam: 'm{} - -' + vm1_blockparam: | + m{} loop_count: 30000000 Index: benchmark/vm1_lvar_init.yml =================================================================== --- benchmark/vm1_lvar_init.yml (revision 63893) +++ benchmark/vm1_lvar_init.yml (revision 63894) @@ -1,16 +1,21 @@ https://github.com/ruby/ruby/blob/trunk/benchmark/vm1_lvar_init.yml#L1 -prelude: | - def m v - unless v - # unreachable code - v1 = v2 = v3 = v4 = v5 = v6 = v7 = v8 = v9 = v10 = - v11 = v12 = v13 = v14 = v15 = v16 = v17 = v18 = v19 = v20 = - v21 = v22 = v23 = v24 = v25 = v26 = v27 = v28 = v29 = v30 = - v31 = v32 = v33 = v34 = v35 = v36 = v37 = v38 = v39 = v40 = - v41 = v42 = v43 = v44 = v45 = v46 = v47 = v48 = v49 = v50 = 1 - end - end +# while loop cost is not removed because `i` is used in the script benchmark: - vm1_lvar_init: 'm i + vm1_lvar_init: | + def m v + unless v + # unreachable code + v1 = v2 = v3 = v4 = v5 = v6 = v7 = v8 = v9 = v10 = + v11 = v12 = v13 = v14 = v15 = v16 = v17 = v18 = v19 = v20 = + v21 = v22 = v23 = v24 = v25 = v26 = v27 = v28 = v29 = v30 = + v31 = v32 = v33 = v34 = v35 = v36 = v37 = v38 = v39 = v40 = + v41 = v42 = v43 = v44 = v45 = v46 = v47 = v48 = v49 = v50 = 1 + end + end -' -loop_count: 30000000 + i = 0 + + while i<30_000_000 + i += 1 + m i + end +loop_count: 1 Index: benchmark/vm1_blockparam_pass.yml =================================================================== --- benchmark/vm1_blockparam_pass.yml (revision 63893) +++ benchmark/vm1_blockparam_pass.yml (revision 63894) @@ -7,7 +7,6 @@ prelude: | https://github.com/ruby/ruby/blob/trunk/benchmark/vm1_blockparam_pass.yml#L7 bp_yield &b end benchmark: - vm1_blockparam_pass: 'bp_pass{} - -' + vm1_blockparam_pass: | + bp_pass{} loop_count: 30000000 Index: benchmark/vm1_simplereturn.yml =================================================================== --- benchmark/vm1_simplereturn.yml (revision 63893) +++ benchmark/vm1_simplereturn.yml (revision 63894) @@ -3,7 +3,5 @@ prelude: | https://github.com/ruby/ruby/blob/trunk/benchmark/vm1_simplereturn.yml#L3 return 1 end benchmark: - vm1_simplereturn: 'm - -' + vm1_simplereturn: m loop_count: 30000000 Index: benchmark/vm1_swap.yml =================================================================== --- benchmark/vm1_swap.yml (revision 63893) +++ benchmark/vm1_swap.yml (revision 63894) @@ -2,7 +2,6 @@ prelude: | https://github.com/ruby/ruby/blob/trunk/benchmark/vm1_swap.yml#L2 a = 1 b = 2 benchmark: - vm1_swap: 'a, b = b, a - -' + vm1_swap: | + a, b = b, a loop_count: 30000000 Index: benchmark/vm1_lvar_set.yml =================================================================== --- benchmark/vm1_lvar_set.yml (revision 63893) +++ benchmark/vm1_lvar_set.yml (revision 63894) @@ -1,6 +1,4 @@ https://github.com/ruby/ruby/blob/trunk/benchmark/vm1_lvar_set.yml#L1 benchmark: - vm1_lvar_set: 'a = b = c = d = e = f = g = h = j = k = l = m = n = o = p = q = r - = 1 - -' + vm1_lvar_set: | + a = b = c = d = e = f = g = h = j = k = l = m = n = o = p = q = r = 1 loop_count: 30000000 Index: benchmark/vm1_const.yml =================================================================== --- benchmark/vm1_const.yml (revision 63893) +++ benchmark/vm1_const.yml (revision 63894) @@ -1,6 +1,5 @@ https://github.com/ruby/ruby/blob/trunk/benchmark/vm1_const.yml#L1 -prelude: 'Const = 1 - -' +prelude: | + Const = 1 benchmark: vm1_const: | j = Const Index: benchmark/vm1_blockparam_yield.yml =================================================================== --- benchmark/vm1_blockparam_yield.yml (revision 63893) +++ benchmark/vm1_blockparam_yield.yml (revision 63894) @@ -3,7 +3,6 @@ prelude: | https://github.com/ruby/ruby/blob/trunk/benchmark/vm1_blockparam_yield.yml#L3 yield end benchmark: - vm1_blockparam_yield: 'bp_yield{} - -' + vm1_blockparam_yield: | + bp_yield{} loop_count: 30000000 Index: benchmark/vm1_blockparam_call.yml =================================================================== --- benchmark/vm1_blockparam_call.yml (revision 63893) +++ benchmark/vm1_blockparam_call.yml (revision 63894) @@ -3,7 +3,6 @@ prelude: | https://github.com/ruby/ruby/blob/trunk/benchmark/vm1_blockparam_call.yml#L3 b.call end benchmark: - vm1_blockparam_call: 'm{} - -' + vm1_blockparam_call: | + m{} loop_count: 30000000 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/