Sha256: adddc7237bfa5e03d6c3f7f26219087cf1f1132c43a7f0afbbb27c8f47e6f362

Contents?: true

Size: 224 Bytes

Versions: 90

Compression:

Stored size: 224 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"
puts fs.size

Version data entries

90 entries across 90 versions & 1 rubygems

Version Path
polyphony-1.6 examples/performance/switch.rb
polyphony-1.5 examples/performance/switch.rb
polyphony-1.4 examples/performance/switch.rb
polyphony-1.3 examples/performance/switch.rb
polyphony-1.2.1 examples/performance/switch.rb
polyphony-1.2 examples/performance/switch.rb
polyphony-1.1.1 examples/performance/switch.rb
polyphony-1.1 examples/performance/switch.rb
polyphony-1.0.2 examples/performance/switch.rb
polyphony-1.0.1 examples/performance/switch.rb
polyphony-1.0 examples/performance/switch.rb
polyphony-0.99.6 examples/performance/switch.rb
polyphony-0.99.5 examples/performance/switch.rb
polyphony-0.99.4 examples/performance/switch.rb
polyphony-0.99.3 examples/performance/switch.rb
polyphony-0.99.2 examples/performance/switch.rb
polyphony-0.99.1 examples/performance/switch.rb
polyphony-0.99 examples/performance/switch.rb
polyphony-0.98 examples/performance/switch.rb
polyphony-0.97 examples/performance/switch.rb