summaryrefslogtreecommitdiff
path: root/benchmark/vm_ivar_lazy_set.yml
blob: 7372ffcfbcad56f7dfecf398371298ada9b13ef5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
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