blob: c6f615d71d4ad19c17dd3f79544e2065d593e0cd (
plain)
1
2
3
4
5
6
7
8
9
|
# based on benchmark for [ruby-core:65518] [Feature #10341] by Knut Franke
fib = Fiber.new do
loop { Fiber.yield }
end
i = 0
while i< 6_000_000 # benchmark loop 2
i += 1
fib.resume
end
|