summaryrefslogtreecommitdiff
path: root/benchmark/vm_fiber_switch.yml
blob: 3de36b66ebe19cb589af9c3e0c9dbe26c12b2693 (plain)
1
2
3
4
5
6
7
8
9
prelude: |
  # based on benchmark for [ruby-core:65518] [Feature #10341] by Knut Franke
  fib = Fiber.new do
    loop { Fiber.yield }
  end
benchmark:
  vm_fiber_switch: |
    fib.resume
loop_count: 20000000