1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/benchmark/vm_ivar_set_subclass.yml
Jemma Issroff c53439294e Fixes ivar benchmarks to not depend on object allocation
Prior to this change, we were measuring object allocation as well
as setting instance variables within ivar benchmarks. With this
change, we now only measure setting instance variables within
ivar benchmarks.
2022-07-15 10:29:42 -04:00

20 lines
281 B
YAML

prelude: |
class A
def set_ivars
@a = nil
@b = nil
@c = nil
@d = nil
@e = nil
end
end
class B < A; end
class C < A; end
b = B.new
c = C.new
benchmark:
vm_ivar_init_subclass: |
b.set_ivars
c.set_ivars
loop_count: 3000000