mirror of
https://github.com/ruby/ruby.git
synced 2026-01-27 04:24:23 +00:00
13 lines
205 B
YAML
13 lines
205 B
YAML
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
|