aboutsummaryrefslogtreecommitdiffstats
path: root/benchmark/vm2_fiber_switch.yml
blob: 63aab8bd05adfeb3075ce566a709ddba4ff27be0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
prelude: |
  # based on benchmark for [ruby-core:65518] [Feature #10341] by Knut Franke
benchmark:
  vm2_fiber_switch: |
    fib = Fiber.new do
      loop { Fiber.yield }
    end
    i = 0
    while i< 6_000_000 # benchmark loop 2
      i += 1
      fib.resume
    end
loop_count: 1