3 ms·
>Async/await are also much slower than properly implemented (see: Golang) fibers. Are there any benchmarks to back that affirmation?
by DeathArrow 4y ago
>Async/await are also much slower than properly implemented (see: Golang) fibers.
Are there any benchmarks to back that affirmation?
- cyberax 4y agoHm. I know this from my personal work, replacing Go code with an async/await code. There's a bunch of benchmarks that compare C# async/await and Goroutines (e.g. https://alexyakunin.medium.com/go-vs-c-part-1-goroutines-vs-async-await-ac909c651c11 https://alexyakunin.medium.com/go-vs-c-part-1-goroutines-vs-... ). Go still wins there, but they all miss the very important case of nested async/awaits. These microbenchmarks also focus on looking at Go channels versus other synchronization methods, which in my experience is not that relevant (Go channels just suck). I guess I'll need to write a blog post.
- DeathArrow 4y agoThose benchmarks are really old, things can change quite fast when it comes to programming language implementations.
- cyberax 4y agoI wrote a quick-and-dirty benchmark: https://blog.alex.net/benchmarking-go-and-c-async-await https://blog.alex.net/benchmarking-go-and-c-async-await Results: Go - 32ms, C# - 494ms. The difference also becomes bigger as you add more recursion levels.