summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 2e25f4466f..947b8c53d5 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 ca43aaf48c..e2817a3ce2 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 416170800e..ca1bef3369 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 bb1e877ea9..56ae617798 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 c0a841ee56..b98db1545c 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 23d12550ac..10e2becef9 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 bd6c3f8156..df8f6b6ea4 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 32fcc02f93..3564aac7e2 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 90683880f1..fed87ccd62 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