Created
July 31, 2017 13:05
-
-
Save sdogruyol/52819e608a3291aa5146254bb298d321 to your computer and use it in GitHub Desktop.
Crystal Channel send benchmark
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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