4 ms·
Channels are implemented using locks, but "4x slower" is a meaningless microbenchmark number.
by enneff 10y ago
Channels are implemented using locks, but "4x slower" is a meaningless microbenchmark number.
- brobinson 10y agoYou're welcome to benchmark it yourself. I got it from [1] which is a pretty recent comparison. [1] http://www.jtolds.com/writing/2016/03/go-channels-are-bad-and-you-should-feel-bad/ http://www.jtolds.com/writing/2016/03/go-channels-are-bad-an...
- gizzlon 10y agoGP said meaningless, not wrong
- brobinson 10y agoI found switching from channels to plain ol' queues to be an enormous performance improvement in a program sending hundreds of millions of messages, though I do agree in general that most programmers won't need to care about it. The program was a financial model backtesting framework which I ended up rewriting in Rust because Go was simply too slow for what I wanted to do.
- rodrigocoelho 10y agoRelevant: https://www.datadoghq.com/blog/go-performance-tales/ https://www.datadoghq.com/blog/go-performance-tales/
- brobinson 10y agoThis is great, thanks!