3 ms·
It is, at least for me, not at all clear that that's possible to do in a good way within the expressive power of any mainstream language. And "good" in this cas
by gspr 5y ago
It is, at least for me, not at all clear that that's possible to do in a good way within the expressive power of any mainstream language. And "good" in this case of Rust would include "without runtime overhead that could be avoided". Is it possible?
- dodobirdlord 5y agoOnce the compiler has computed the async graph, it could in theory fuse subgraphs of nodes (especially linear sequences) back together and re-express the execution flow in terms of spawning and joining threads. This would be simple and could even be a performance win for some graphs (i.e. embarrassingly parallel ones), and would be a complete trainwreck for many, probably most. I certainly wouldn’t want to be stuck reading the error messages produced by a compiler when it failed to find a satisfactory solution to a complex execution graph. Profile guided optimization might help I suppose, but still.