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-0.96 examples/performance/switch.rb
polyphony-0.95 examples/performance/switch.rb
polyphony-0.94 examples/performance/switch.rb
polyphony-0.93 examples/performance/switch.rb
polyphony-0.92 examples/performance/switch.rb
polyphony-0.91 examples/performance/switch.rb
polyphony-0.90 examples/performance/switch.rb
polyphony-0.89 examples/performance/switch.rb
polyphony-0.87 examples/performance/switch.rb
polyphony-0.86 examples/performance/switch.rb
polyphony-0.85 examples/performance/switch.rb
polyphony-0.84.1 examples/performance/switch.rb
polyphony-0.84 examples/performance/switch.rb
polyphony-0.83 examples/performance/switch.rb
polyphony-0.82 examples/performance/switch.rb
polyphony-0.81.1 examples/performance/switch.rb
polyphony-0.81 examples/performance/switch.rb
polyphony-0.80 examples/performance/switch.rb
polyphony-0.79 examples/performance/switch.rb
polyphony-0.78 examples/performance/switch.rb