2018-07-08 20:19:57 +03: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 18:35:22 +03:00
|
|
|
end
|
2018-07-08 20:19:57 +03:00
|
|
|
class C2
|
|
|
|
def m
|
|
|
|
2
|
|
|
|
end
|
2018-07-08 18:35:22 +03:00
|
|
|
end
|
|
|
|
|
2018-07-08 20:19:57 +03:00
|
|
|
o1 = C1.new
|
|
|
|
o2 = C2.new
|
|
|
|
|
|
|
|
i = 0
|
|
|
|
while i<6_000_000
|
|
|
|
o = (i % 2 == 0) ? o1 : o2
|
2018-07-08 18:35:22 +03:00
|
|
|
# o.m; o.m; o.m; o.m; o.m; o.m; o.m; o.m
|
2018-07-08 20:19:57 +03:00
|
|
|
i += 1
|
|
|
|
end
|
|
|
|
loop_count: 1
|