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_lazy_set.yml

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

13 lines
206 B
YAML
Raw Normal View History

prelude: |
class Example
def lazy_set
@uninitialized ||= 123
end
end
objs = 10000000.times.map { Example.new }
benchmark:
vm_ivar_lazy_set: |
objs.each(&:lazy_set)
loop_count: 1