summaryrefslogtreecommitdiff
path: root/benchmark/object_allocate.yml
blob: 93ff463e415585d0cd9995161e0406e27c8de9fe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
prelude: |
  class Eight
    8.times { include(Module.new) }
  end
  class ThirtyTwo
    32.times { include(Module.new) }
  end
  class SixtyFour
    64.times { include(Module.new) }
  end
  class OneTwentyEight
    128.times { include(Module.new) }
  end
  # Disable GC to see raw throughput:
  GC.disable
benchmark:
  allocate_8_deep: Eight.new
  allocate_32_deep: ThirtyTwo.new
  allocate_64_deep: SixtyFour.new
  allocate_128_deep: OneTwentyEight.new
loop_count: 100000