aboutsummaryrefslogtreecommitdiffstats
path: root/benchmark/vm2_poly_singleton.yml
diff options
context:
space:
mode:
Diffstat (limited to 'benchmark/vm2_poly_singleton.yml')
-rw-r--r--benchmark/vm2_poly_singleton.yml27
1 files changed, 16 insertions, 11 deletions
diff --git a/benchmark/vm2_poly_singleton.yml b/benchmark/vm2_poly_singleton.yml
index a22c3c3e9a..e58d7bfb37 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