2018-07-08 17:19:57 +00:00
|
|
|
# loop_count is not utilized since `i` is involved in the script
|
|
|
|
benchmark:
|
|
|
|
vm2_poly_method_ov: |
|
|
|
|
class C1
|
|
|
|
def m
|
|
|
|
1
|
|
|
|
end
|
2018-07-08 15:35:22 +00:00
|
|
|
end
|
2018-07-08 17:19:57 +00:00
|
|
|
class C2
|
|
|
|
def m
|
|
|
|
2
|
|
|
|
end
|
2018-07-08 15:35:22 +00:00
|
|
|
end
|
|
|
|
|
2018-07-08 17:19:57 +00:00
|
|
|
o1 = C1.new
|
|
|
|
o2 = C2.new
|
|
|
|
|
|
|
|
i = 0
|
|
|
|
while i<6_000_000
|
|
|
|
o = (i % 2 == 0) ? o1 : o2
|
2018-07-08 15:35:22 +00:00
|
|
|
# o.m; o.m; o.m; o.m; o.m; o.m; o.m; o.m
|
2018-07-08 17:19:57 +00:00
|
|
|
i += 1
|
|
|
|
end
|
|
|
|
loop_count: 1
|