summaryrefslogtreecommitdiff
path: root/benchmark
diff options
context:
space:
mode:
authork0kubun <k0kubun@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-07-08 17:19:57 (GMT)
committerk0kubun <k0kubun@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-07-08 17:19:57 (GMT)
commit71f8406f6ca52a9301ec64b8d9ef64618051eef0 (patch)
tree7d90e3a1127f831c4cda77c8105f38ea2fc9a265 /benchmark
parent12068aa4e980ab32a0438408a519030e65dabf5e (diff)
benchmark/vm2_*.yml: fix ugly conversion errors
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63897 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'benchmark')
-rw-r--r--benchmark/vm2_array.yml5
-rw-r--r--benchmark/vm2_defined_method.yml5
-rw-r--r--benchmark/vm2_eval.yml5
-rw-r--r--benchmark/vm2_method.yml5
-rw-r--r--benchmark/vm2_method_missing.yml5
-rw-r--r--benchmark/vm2_method_with_block.yml5
-rw-r--r--benchmark/vm2_module_ann_const_set.yml5
-rw-r--r--benchmark/vm2_mutex.yml5
-rw-r--r--benchmark/vm2_newlambda.yml5
-rw-r--r--benchmark/vm2_poly_method.yml37
-rw-r--r--benchmark/vm2_poly_method_ov.yml35
-rw-r--r--benchmark/vm2_poly_singleton.yml27
-rw-r--r--benchmark/vm2_proc.yml5
-rw-r--r--benchmark/vm2_send.yml5
-rw-r--r--benchmark/vm2_string_literal.yml5
-rw-r--r--benchmark/vm2_struct_big_aref_hi.yml5
-rw-r--r--benchmark/vm2_struct_big_aref_lo.yml5
-rw-r--r--benchmark/vm2_struct_big_aset.yml17
-rw-r--r--benchmark/vm2_struct_big_href_hi.yml5
-rw-r--r--benchmark/vm2_struct_big_href_lo.yml5
-rw-r--r--benchmark/vm2_struct_big_hset.yml17
-rw-r--r--benchmark/vm2_struct_small_aref.yml5
-rw-r--r--benchmark/vm2_struct_small_aset.yml5
-rw-r--r--benchmark/vm2_struct_small_href.yml5
-rw-r--r--benchmark/vm2_struct_small_hset.yml5
-rw-r--r--benchmark/vm2_super.yml7
26 files changed, 119 insertions, 121 deletions
diff --git a/benchmark/vm2_array.yml b/benchmark/vm2_array.yml
index 6bed8e3..7373098 100644
--- a/benchmark/vm2_array.yml
+++ b/benchmark/vm2_array.yml
@@ -1,5 +1,4 @@
benchmark:
- vm2_array: 'a = [1,2,3,4,5,6,7,8,9,10]
-
-'
+ vm2_array: |
+ a = [1,2,3,4,5,6,7,8,9,10]
loop_count: 6000000
diff --git a/benchmark/vm2_defined_method.yml b/benchmark/vm2_defined_method.yml
index 8bc65cf..e1b0d55 100644
--- a/benchmark/vm2_defined_method.yml
+++ b/benchmark/vm2_defined_method.yml
@@ -3,7 +3,6 @@ prelude: |
define_method(:m){}
end
benchmark:
- vm2_defined_method: 'm; m; m; m; m; m; m; m;
-
-'
+ vm2_defined_method: |
+ m; m; m; m; m; m; m; m;
loop_count: 6000000
diff --git a/benchmark/vm2_eval.yml b/benchmark/vm2_eval.yml
index 65b9359..d506a9c 100644
--- a/benchmark/vm2_eval.yml
+++ b/benchmark/vm2_eval.yml
@@ -1,5 +1,4 @@
benchmark:
- vm2_eval: 'eval("1")
-
-'
+ vm2_eval: |
+ eval("1")
loop_count: 6000000
diff --git a/benchmark/vm2_method.yml b/benchmark/vm2_method.yml
index 15baf05..cc7b9b2 100644
--- a/benchmark/vm2_method.yml
+++ b/benchmark/vm2_method.yml
@@ -3,7 +3,6 @@ prelude: |
nil
end
benchmark:
- vm2_method: 'm; m; m; m; m; m; m; m;
-
-'
+ vm2_method: |
+ m; m; m; m; m; m; m; m;
loop_count: 6000000
diff --git a/benchmark/vm2_method_missing.yml b/benchmark/vm2_method_missing.yml
index 67e8838..cbfb794 100644
--- a/benchmark/vm2_method_missing.yml
+++ b/benchmark/vm2_method_missing.yml
@@ -6,7 +6,6 @@ prelude: |
obj = C.new
benchmark:
- vm2_method_missing: 'obj.m; obj.m; obj.m; obj.m; obj.m; obj.m; obj.m; obj.m;
-
-'
+ vm2_method_missing: |
+ obj.m; obj.m; obj.m; obj.m; obj.m; obj.m; obj.m; obj.m;
loop_count: 6000000
diff --git a/benchmark/vm2_method_with_block.yml b/benchmark/vm2_method_with_block.yml
index ab4be77..6e522ad 100644
--- a/benchmark/vm2_method_with_block.yml
+++ b/benchmark/vm2_method_with_block.yml
@@ -3,7 +3,6 @@ prelude: |
nil
end
benchmark:
- vm2_method_with_block: 'm{}; m{}; m{}; m{}; m{}; m{}; m{}; m{};
-
-'
+ vm2_method_with_block: |
+ m{}; m{}; m{}; m{}; m{}; m{}; m{}; m{};
loop_count: 6000000
diff --git a/benchmark/vm2_module_ann_const_set.yml b/benchmark/vm2_module_ann_const_set.yml
index 4783bce..b0becd9 100644
--- a/benchmark/vm2_module_ann_const_set.yml
+++ b/benchmark/vm2_module_ann_const_set.yml
@@ -1,5 +1,4 @@
benchmark:
- vm2_module_ann_const_set: 'Module.new.const_set(:X, Module.new)
-
-'
+ vm2_module_ann_const_set: |
+ Module.new.const_set(:X, Module.new)
loop_count: 6000000
diff --git a/benchmark/vm2_mutex.yml b/benchmark/vm2_mutex.yml
index caa0e9a..c40a904 100644
--- a/benchmark/vm2_mutex.yml
+++ b/benchmark/vm2_mutex.yml
@@ -3,7 +3,6 @@ prelude: |
m = Thread::Mutex.new
benchmark:
- vm2_mutex: 'm.synchronize{}
-
-'
+ vm2_mutex: |
+ m.synchronize{}
loop_count: 6000000
diff --git a/benchmark/vm2_newlambda.yml b/benchmark/vm2_newlambda.yml
index 6f7c516..93133f9 100644
--- a/benchmark/vm2_newlambda.yml
+++ b/benchmark/vm2_newlambda.yml
@@ -1,5 +1,4 @@
benchmark:
- vm2_newlambda: 'lambda {}
-
-'
+ vm2_newlambda: |
+ lambda {}
loop_count: 6000000
diff --git a/benchmark/vm2_poly_method.yml b/benchmark/vm2_poly_method.yml
index 6554151..0104bdf 100644
--- a/benchmark/vm2_poly_method.yml
+++ b/benchmark/vm2_poly_method.yml
@@ -1,19 +1,24 @@
-prelude: |
- class C1
- def m
- 1
+# loop_count is not utilized since `i` is involved in the script
+benchmark:
+ vm2_poly_method: |
+ class C1
+ def m
+ 1
+ end
end
- end
- class C2
- def m
- 2
+ class C2
+ def m
+ 2
+ end
end
- end
- o1 = C1.new
- o2 = C2.new
-benchmark:
- vm2_poly_method: |
- o = (i % 2 == 0) ? o1 : o2
- o.m; o.m; o.m; o.m; o.m; o.m; o.m; o.m
-loop_count: 6000000
+ o1 = C1.new
+ o2 = C2.new
+
+ i = 0
+ while i<6_000_000
+ o = (i % 2 == 0) ? o1 : o2
+ o.m; o.m; o.m; o.m; o.m; o.m; o.m; o.m
+ i += 1
+ end
+loop_count: 1
diff --git a/benchmark/vm2_poly_method_ov.yml b/benchmark/vm2_poly_method_ov.yml
index b77a588..3748073 100644
--- a/benchmark/vm2_poly_method_ov.yml
+++ b/benchmark/vm2_poly_method_ov.yml
@@ -1,19 +1,24 @@
-prelude: |
- class C1
- def m
- 1
+# loop_count is not utilized since `i` is involved in the script
+benchmark:
+ vm2_poly_method_ov: |
+ class C1
+ def m
+ 1
+ end
end
- end
- class C2
- def m
- 2
+ class C2
+ def m
+ 2
+ end
end
- end
- o1 = C1.new
- o2 = C2.new
-benchmark:
- vm2_poly_method_ov: |
- o = (i % 2 == 0) ? o1 : o2
+ o1 = C1.new
+ o2 = C2.new
+
+ i = 0
+ while i<6_000_000
+ o = (i % 2 == 0) ? o1 : o2
# o.m; o.m; o.m; o.m; o.m; o.m; o.m; o.m
-loop_count: 6000000
+ i += 1
+ end
+loop_count: 1
diff --git a/benchmark/vm2_poly_singleton.yml b/benchmark/vm2_poly_singleton.yml
index a22c3c3..e58d7bf 100644
--- a/benchmark/vm2_poly_singleton.yml
+++ b/benchmark/vm2_poly_singleton.yml
@@ -1,13 +1,18 @@
-prelude: |
- class C1
- def m; 1; end
- end
-
- o1 = C1.new
- o2 = C1.new
- o2.singleton_class
+# loop_count is not utilized since `i` is involved in the script
benchmark:
vm2_poly_singleton: |
- o = (i % 2 == 0) ? o1 : o2
- o.m; o.m; o.m; o.m; o.m; o.m; o.m; o.m
-loop_count: 6000000
+ class C1
+ def m; 1; end
+ end
+
+ o1 = C1.new
+ o2 = C1.new
+ o2.singleton_class
+
+ i = 0
+ while i<6_000_000 # benchmark loop 2
+ o = (i % 2 == 0) ? o1 : o2
+ o.m; o.m; o.m; o.m; o.m; o.m; o.m; o.m
+ i += 1
+ end
+loop_count: 1
diff --git a/benchmark/vm2_proc.yml b/benchmark/vm2_proc.yml
index 782e9ae..5c36e93 100644
--- a/benchmark/vm2_proc.yml
+++ b/benchmark/vm2_proc.yml
@@ -7,7 +7,6 @@ prelude: |
a = 1
}
benchmark:
- vm2_proc: 'pr.call
-
-'
+ vm2_proc: |
+ pr.call
loop_count: 6000000
diff --git a/benchmark/vm2_send.yml b/benchmark/vm2_send.yml
index 6011d31..44a12a2 100644
--- a/benchmark/vm2_send.yml
+++ b/benchmark/vm2_send.yml
@@ -6,7 +6,6 @@ prelude: |
o = C.new
benchmark:
- vm2_send: 'o.__send__ :m
-
-'
+ vm2_send: |
+ o.__send__ :m
loop_count: 6000000
diff --git a/benchmark/vm2_string_literal.yml b/benchmark/vm2_string_literal.yml
index 265cf9b..54b0aec 100644
--- a/benchmark/vm2_string_literal.yml
+++ b/benchmark/vm2_string_literal.yml
@@ -1,5 +1,4 @@
benchmark:
- vm2_string_literal: 'x = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
-
-'
+ vm2_string_literal: |
+ x = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
loop_count: 6000000
diff --git a/benchmark/vm2_struct_big_aref_hi.yml b/benchmark/vm2_struct_big_aref_hi.yml
index 2db4f3c..eed1846 100644
--- a/benchmark/vm2_struct_big_aref_hi.yml
+++ b/benchmark/vm2_struct_big_aref_hi.yml
@@ -2,7 +2,6 @@ prelude: |
s = Struct.new(*('a'..'z').map { |x| x.to_sym })
x = s.new
benchmark:
- vm2_struct_big_aref_hi: 'x.z # x[25]
-
-'
+ vm2_struct_big_aref_hi: |
+ x.z # x[25]
loop_count: 6000000
diff --git a/benchmark/vm2_struct_big_aref_lo.yml b/benchmark/vm2_struct_big_aref_lo.yml
index 17b2b0c..0915435 100644
--- a/benchmark/vm2_struct_big_aref_lo.yml
+++ b/benchmark/vm2_struct_big_aref_lo.yml
@@ -2,7 +2,6 @@ prelude: |
s = Struct.new(*('a'..'z').map { |x| x.to_sym })
x = s.new
benchmark:
- vm2_struct_big_aref_lo: 'x.k # x[10]
-
-'
+ vm2_struct_big_aref_lo: |
+ x.k # x[10]
loop_count: 6000000
diff --git a/benchmark/vm2_struct_big_aset.yml b/benchmark/vm2_struct_big_aset.yml
index 4578876..6af5010 100644
--- a/benchmark/vm2_struct_big_aset.yml
+++ b/benchmark/vm2_struct_big_aset.yml
@@ -1,8 +1,11 @@
-prelude: |
- s = Struct.new(*('a'..'z').map { |x| x.to_sym })
- x = s.new
+# loop_count is not utilized since `i` is involved in the script
benchmark:
- vm2_struct_big_aset: 'x.k = i # x[10] = i
-
-'
-loop_count: 6000000
+ vm2_struct_big_aset: |
+ s = Struct.new(*('a'..'z').map { |x| x.to_sym })
+ x = s.new
+ i = 0
+ while i<6_000_000
+ i += 1
+ x.k = i # x[10] = i
+ end
+loop_count: 1
diff --git a/benchmark/vm2_struct_big_href_hi.yml b/benchmark/vm2_struct_big_href_hi.yml
index aa5d778..60aa7fd 100644
--- a/benchmark/vm2_struct_big_href_hi.yml
+++ b/benchmark/vm2_struct_big_href_hi.yml
@@ -2,7 +2,6 @@ prelude: |
s = Struct.new(*('a'..'z').map { |x| x.to_sym })
x = s.new
benchmark:
- vm2_struct_big_href_hi: 'x[:z]
-
-'
+ vm2_struct_big_href_hi: |
+ x[:z]
loop_count: 6000000
diff --git a/benchmark/vm2_struct_big_href_lo.yml b/benchmark/vm2_struct_big_href_lo.yml
index d662816..c55c0bd 100644
--- a/benchmark/vm2_struct_big_href_lo.yml
+++ b/benchmark/vm2_struct_big_href_lo.yml
@@ -2,7 +2,6 @@ prelude: |
s = Struct.new(*('a'..'z').map { |x| x.to_sym })
x = s.new
benchmark:
- vm2_struct_big_href_lo: 'x[:k]
-
-'
+ vm2_struct_big_href_lo: |
+ x[:k]
loop_count: 6000000
diff --git a/benchmark/vm2_struct_big_hset.yml b/benchmark/vm2_struct_big_hset.yml
index 963b668..d199c5b 100644
--- a/benchmark/vm2_struct_big_hset.yml
+++ b/benchmark/vm2_struct_big_hset.yml
@@ -1,8 +1,11 @@
-prelude: |
- s = Struct.new(*('a'..'z').map { |x| x.to_sym })
- x = s.new
+# loop_count is not utilized since `i` is involved in the script
benchmark:
- vm2_struct_big_hset: 'x[:k] = i
-
-'
-loop_count: 6000000
+ vm2_struct_big_hset: |
+ s = Struct.new(*('a'..'z').map { |x| x.to_sym })
+ x = s.new
+ i = 0
+ while i<6_000_000
+ i += 1
+ x[:k] = i
+ end
+loop_count: 1
diff --git a/benchmark/vm2_struct_small_aref.yml b/benchmark/vm2_struct_small_aref.yml
index 22cd919..83381be 100644
--- a/benchmark/vm2_struct_small_aref.yml
+++ b/benchmark/vm2_struct_small_aref.yml
@@ -2,7 +2,6 @@ prelude: |
s = Struct.new(:a, :b, :c)
x = s.new
benchmark:
- vm2_struct_small_aref: 'x.a
-
-'
+ vm2_struct_small_aref: |
+ x.a
loop_count: 6000000
diff --git a/benchmark/vm2_struct_small_aset.yml b/benchmark/vm2_struct_small_aset.yml
index e6a8a5e..adb9f49 100644
--- a/benchmark/vm2_struct_small_aset.yml
+++ b/benchmark/vm2_struct_small_aset.yml
@@ -2,7 +2,6 @@ prelude: |
s = Struct.new(:a, :b, :c)
x = s.new
benchmark:
- vm2_struct_small_aset: 'x.a = i
-
-'
+ vm2_struct_small_aset: |
+ x.a = i
loop_count: 6000000
diff --git a/benchmark/vm2_struct_small_href.yml b/benchmark/vm2_struct_small_href.yml
index c98122a..b744f07 100644
--- a/benchmark/vm2_struct_small_href.yml
+++ b/benchmark/vm2_struct_small_href.yml
@@ -2,7 +2,6 @@ prelude: |
s = Struct.new(:a, :b, :c)
x = s.new
benchmark:
- vm2_struct_small_href: 'x[:a]
-
-'
+ vm2_struct_small_href: |
+ x[:a]
loop_count: 6000000
diff --git a/benchmark/vm2_struct_small_hset.yml b/benchmark/vm2_struct_small_hset.yml
index edfde8b..d43845d 100644
--- a/benchmark/vm2_struct_small_hset.yml
+++ b/benchmark/vm2_struct_small_hset.yml
@@ -2,7 +2,6 @@ prelude: |
s = Struct.new(:a, :b, :c)
x = s.new
benchmark:
- vm2_struct_small_hset: 'x[:a] = 1
-
-'
+ vm2_struct_small_hset: |
+ x[:a] = 1
loop_count: 6000000
diff --git a/benchmark/vm2_super.yml b/benchmark/vm2_super.yml
index 79da4ac..6747437 100644
--- a/benchmark/vm2_super.yml
+++ b/benchmark/vm2_super.yml
@@ -1,5 +1,4 @@
-prelude: |2
-
+prelude: |
class C
def m
1
@@ -14,7 +13,5 @@ prelude: |2
obj = CC.new
benchmark:
- vm2_super: 'obj.m
-
-'
+ vm2_super: obj.m
loop_count: 6000000