summaryrefslogtreecommitdiff
path: root/benchmark/vm2_fiber_switch.yml
diff options
context:
space:
mode:
Diffstat (limited to 'benchmark/vm2_fiber_switch.yml')
-rw-r--r--benchmark/vm2_fiber_switch.yml13
1 files changed, 13 insertions, 0 deletions
diff --git a/benchmark/vm2_fiber_switch.yml b/benchmark/vm2_fiber_switch.yml
new file mode 100644
index 0000000..63aab8b
--- /dev/null
+++ b/benchmark/vm2_fiber_switch.yml
@@ -0,0 +1,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