3 ms·
> It doesn't use segmented stacks so it doesn't achieve the M:N performance of Go Actually, if you use Tokio or similar approach, you achieve better performan
by kixunil 9y ago
> It doesn't use segmented stacks so it doesn't achieve the M:N performance of Go
Actually, if you use Tokio or similar approach, you achieve better performance than Go (no need to re-allocate stacks) while code is still quite readable and boilerplate-free.
- Rusky 9y agoThey seem to be aware: ", but it has memory and data race safety, OS threads, and futures, so no problem." However, futures are certainly not boilerplate-free. They destroy your ability to use native control flow the way you can with threads (M:N or 1:1). You can get some of that back with async/await, but Rust doesn't have that and it's still not boilerplate-free.
- camgunz 9y agoYeah Tokio is the answer and what I'm referring to. All I meant was if you implement M:N in Rust it'll be slower than Go. I think this is probably the right answer, as segmented stacks cost you C interoperability, but it's not right for everything.