3 ms·
First-class continuations are too unrestricted to match the performance of Rust-style async/await. If you take on a few limitations you can get there, but then
by Rusky 7y ago
First-class continuations are too unrestricted to match the performance of Rust-style async/await.
If you take on a few limitations you can get there, but then those are exactly the things people complain about.
- sedachv 7y agoIt is worse than that. First-class continuations add a small overhead for stack operations, and they always have more memory overhead than callbacks/async transformation into callbacks. But the comment I was replying was about Go, not Rust. For the small overhead that first-class continuations have, they provide a simple and efficient way to handle coroutines, generators, asynchronous I/O, and green threads.