Skip to content

Instantly share code, notes, and snippets.

@sdogruyol
Created July 31, 2017 13:05
Show Gist options
  • Save sdogruyol/52819e608a3291aa5146254bb298d321 to your computer and use it in GitHub Desktop.
Save sdogruyol/52819e608a3291aa5146254bb298d321 to your computer and use it in GitHub Desktop.
Crystal Channel send benchmark
require "benchmark"
channel = Channel(Int32).new
spawn do
loop do
channel.receive
end
end
Benchmark.ips do |x|
x.report { channel.send 1 }
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment