2018-07-08 17:19:57 +00:00
|
|
|
# loop_count is not utilized since `i` is involved in the script
|
2018-07-08 15:35:22 +00:00
|
|
|
benchmark:
|
2020-04-14 04:37:42 +00:00
|
|
|
vm_poly_singleton: |
|
2018-07-08 17:19:57 +00:00
|
|
|
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
|