4 ms·
TL;DR `async` considered harmful. For all the C++ laughing in this thread, there's really only one thing that makes C++ slow - non-`extern` templates - and C++
by o11c 1y ago
TL;DR `async` considered harmful.
For all the C++ laughing in this thread, there's really only one thing that makes C++ slow - non-`extern` templates - and C++ gives you a lot more space to speed them up than Rust does.
- int_19h 1y agoC++ also has async these days. As for templates, I can't think of anything about them that would speed up things substantially wrt Rust aside from extern template and manually managing your instantiations in separate .cpp files. Since otherwise it's fundamentally the same problem - recompiling the same code over and over again because it's parametrized with different types every time. Indeed, out of the box I would actually expect C++ to do worse because a C++ header template has potentially different environment in every translation unit in which that header is included, so without precompiled headers the compiler pretty much has to assume the worst...
- sgt 1y agoWhat happened with Zig and async? Last I heard they might never implement it.