Skip to content

Instantly share code, notes, and snippets.

@RX14

RX14/bench.cr Secret

Created June 9, 2017 20:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save RX14/477636d4b036e74d14c899e26a939f52 to your computer and use it in GitHub Desktop.
Save RX14/477636d4b036e74d14c899e26a939f52 to your computer and use it in GitHub Desktop.
require "benchmark"
channel = Channel(Int64).new
spawn do
loop do
channel.receive
end
end
Benchmark.ips do |x|
x.report { channel.send 1_i64 }
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment