summaryrefslogtreecommitdiff
path: root/benchmark
diff options
context:
space:
mode:
authork0kubun <k0kubun@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-07-08 16:35:44 (GMT)
committerk0kubun <k0kubun@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-07-08 16:35:44 (GMT)
commit94e55bbd37ea08e7bf1c7d704be753da621476df (patch)
tree3510bc650526ba4fed9b0473c014492c0355efa9 /benchmark
parent820ad9cb1d72d0897b73dae282df3793814b27e8 (diff)
benchmark/vm1_*.yml: manual fixes for ugly conversions
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63894 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'benchmark')
-rw-r--r--benchmark/vm1_blockparam.yml5
-rw-r--r--benchmark/vm1_blockparam_call.yml5
-rw-r--r--benchmark/vm1_blockparam_pass.yml5
-rw-r--r--benchmark/vm1_blockparam_yield.yml5
-rw-r--r--benchmark/vm1_const.yml5
-rw-r--r--benchmark/vm1_lvar_init.yml33
-rw-r--r--benchmark/vm1_lvar_set.yml6
-rw-r--r--benchmark/vm1_simplereturn.yml4
-rw-r--r--benchmark/vm1_swap.yml5
9 files changed, 34 insertions, 39 deletions
diff --git a/benchmark/vm1_blockparam.yml b/benchmark/vm1_blockparam.yml
index 2e25f44..947b8c5 100644
--- a/benchmark/vm1_blockparam.yml
+++ b/benchmark/vm1_blockparam.yml
@@ -2,7 +2,6 @@ prelude: |
def m &b
end
benchmark:
- vm1_blockparam: 'm{}
-
-'
+ vm1_blockparam: |
+ m{}
loop_count: 30000000
diff --git a/benchmark/vm1_blockparam_call.yml b/benchmark/vm1_blockparam_call.yml
index ca43aaf..e2817a3 100644
--- a/benchmark/vm1_blockparam_call.yml
+++ b/benchmark/vm1_blockparam_call.yml
@@ -3,7 +3,6 @@ prelude: |
b.call
end
benchmark:
- vm1_blockparam_call: 'm{}
-
-'
+ vm1_blockparam_call: |
+ m{}
loop_count: 30000000
diff --git a/benchmark/vm1_blockparam_pass.yml b/benchmark/vm1_blockparam_pass.yml
index 4161708..ca1bef3 100644
--- a/benchmark/vm1_blockparam_pass.yml
+++ b/benchmark/vm1_blockparam_pass.yml
@@ -7,7 +7,6 @@ prelude: |
bp_yield &b
end
benchmark:
- vm1_blockparam_pass: 'bp_pass{}
-
-'
+ vm1_blockparam_pass: |
+ bp_pass{}
loop_count: 30000000
diff --git a/benchmark/vm1_blockparam_yield.yml b/benchmark/vm1_blockparam_yield.yml
index bb1e877..56ae617 100644
--- a/benchmark/vm1_blockparam_yield.yml
+++ b/benchmark/vm1_blockparam_yield.yml
@@ -3,7 +3,6 @@ prelude: |
yield
end
benchmark:
- vm1_blockparam_yield: 'bp_yield{}
-
-'
+ vm1_blockparam_yield: |
+ bp_yield{}
loop_count: 30000000
diff --git a/benchmark/vm1_const.yml b/benchmark/vm1_const.yml
index c0a841e..b98db15 100644
--- a/benchmark/vm1_const.yml
+++ b/benchmark/vm1_const.yml
@@ -1,6 +1,5 @@
-prelude: 'Const = 1
-
-'
+prelude: |
+ Const = 1
benchmark:
vm1_const: |
j = Const
diff --git a/benchmark/vm1_lvar_init.yml b/benchmark/vm1_lvar_init.yml
index 23d1255..10e2bec 100644
--- a/benchmark/vm1_lvar_init.yml
+++ b/benchmark/vm1_lvar_init.yml
@@ -1,16 +1,21 @@
-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
diff --git a/benchmark/vm1_lvar_set.yml b/benchmark/vm1_lvar_set.yml
index bd6c3f8..df8f6b6 100644
--- a/benchmark/vm1_lvar_set.yml
+++ b/benchmark/vm1_lvar_set.yml
@@ -1,6 +1,4 @@
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
diff --git a/benchmark/vm1_simplereturn.yml b/benchmark/vm1_simplereturn.yml
index 32fcc02..3564aac 100644
--- a/benchmark/vm1_simplereturn.yml
+++ b/benchmark/vm1_simplereturn.yml
@@ -3,7 +3,5 @@ prelude: |
return 1
end
benchmark:
- vm1_simplereturn: 'm
-
-'
+ vm1_simplereturn: m
loop_count: 30000000
diff --git a/benchmark/vm1_swap.yml b/benchmark/vm1_swap.yml
index 9068388..fed87cc 100644
--- a/benchmark/vm1_swap.yml
+++ b/benchmark/vm1_swap.yml
@@ -2,7 +2,6 @@ prelude: |
a = 1
b = 2
benchmark:
- vm1_swap: 'a, b = b, a
-
-'
+ vm1_swap: |
+ a, b = b, a
loop_count: 30000000