Sha256: 5fdd33443b0d609c59132247d91a3ce0c51354bed7159259cd3db4feff06da6e

Contents?: true

Size: 211 Bytes

Versions: 26

Compression:

Stored size: 211 Bytes

Contents

# frozen_string_literal: true

require 'fiber'

X = 10_000_000

main = Fiber.current
f = Fiber.new do
  loop { main.transfer }
end

t0 = Time.now
X.times { f.transfer }
dt = Time.now - t0
puts "#{X / dt.to_f}/s"

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
polyphony-0.45.0 examples/io/xx-switch.rb
polyphony-0.44.0 examples/io/xx-switch.rb
polyphony-0.43.11 examples/io/xx-switch.rb
polyphony-0.43.10 examples/io/xx-switch.rb
polyphony-0.43.9 examples/io/xx-switch.rb
polyphony-0.43.8 examples/io/xx-switch.rb
polyphony-0.43.6 examples/io/xx-switch.rb
polyphony-0.43.5 examples/io/xx-switch.rb
polyphony-0.43.4 examples/io/xx-switch.rb
polyphony-0.43.3 examples/io/xx-switch.rb
polyphony-0.43.2 examples/io/xx-switch.rb
polyphony-0.43.1 examples/io/xx-switch.rb
polyphony-0.43 examples/io/xx-switch.rb
polyphony-0.42 examples/io/xx-switch.rb
polyphony-0.41 examples/io/xx-switch.rb
polyphony-0.40 examples/io/xx-switch.rb
polyphony-0.39 examples/io/xx-switch.rb
polyphony-0.38 examples/io/xx-switch.rb
polyphony-0.36 examples/io/xx-switch.rb
polyphony-0.34 examples/io/xx-switch.rb