You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks. It's interesting. Glad to see people innovating new tools around Cargo to improve the ecosystem. That's why Cargo thrives on being configurable.
Unfortunately, it is often not easy to change the defaults. We usually do benchmarks with as much real world cases as we could. For example, people working on compiler performance this year try to benchmark different profile settings. Even with a great improvement of the initial result, there are still some cases might get performance loss, let alone some configs might make debugging proc-macro/build script harder.
Back to the configurations you proposed. sccache is a great tool to share compilation cache across packages. It's easy to install and use even without being default. However, it might break someone's code if Cargo switches wrapper to sccache. sccache itself does not support incremental compilation at this moment. From my personal experience, sccache does not always speedup the build. Leaving the option for users to choose might be a better default.
For mold, it's quite astonishing. I use it on my personal project. However, it is not prevalent in Linux world and people need to install it additionally. Here is a discussion about default linker you might be interested in.
Generally, Cargo tries its best to provide a configurable build settings. When talking about changing defaults, it is often conservative in order not to break people's code.
There is a group of great developers working on compiler performance. Its roadmap covers parts of the proposed defaults. I am going to close this issue and leave the stage for them. If you think they are different, feel free to reopen.
Problem
When https://github.com/dimensionhq/fleet claimed to be 5x faster than Cargo, vladvasiliu in HN mentioned some defaults that can be added in the
Cargo.toml
for the same performance improvement:Proposed Solution
If that's true, please add above defaults in
Cargo.toml
Notes
No response
The text was updated successfully, but these errors were encountered: