ruby/benchmark/vm1_attr_ivar.yml

15 строки
200 B
YAML

prelude: |
class C
attr_reader :a, :b
def initialize
@a = nil
@b = nil
end
end
obj = C.new
benchmark:
vm1_attr_ivar: |
j = obj.a
k = obj.b
loop_count: 30000000