-
Notifications
You must be signed in to change notification settings - Fork 852
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add fast build profile without debuginfo #2628
Conversation
Add a compile option `-p fast-build` for a 16% incremental compile speedup (linux) at the cost of having no debuginfo. After trying various rust compiler speedup suggestions, setting mold as my default linker and removing debuginfo are the only ones showing a speedup. ``` hyperfine --warmup 1 --runs 3 --prepare "touch crates/uv-resolver/src/resolver/mod.rs" \ "cargo +nightly build --bin uv" \ "cargo +nightly build --bin uv --profile fast-build" Benchmark 1: cargo +nightly build --bin uv Time (mean ± σ): 1.569 s ± 0.008 s [User: 1.179 s, System: 0.369 s] Range (min … max): 1.560 s … 1.576 s 3 runs Benchmark 2: cargo +nightly build --bin uv --profile fast-build Time (mean ± σ): 1.353 s ± 0.020 s [User: 1.109 s, System: 0.301 s] Range (min … max): 1.338 s … 1.375 s 3 runs Summary cargo +nightly build --bin uv --profile fast-build ran 1.16 ± 0.02 times faster than cargo +nightly build --bin uv ```
What's the use-case for this? |
Should we use this in CI? |
A faster edit-run loop, ideally |
What is the practical cost of having no debug info? (My main pushback here is: who's going to remember to set this? When should they? Should this be the default? Etc.) |
There were several reports recently about massive speedups for debug builds using advanced or experimental cargo options: Using the parallel frontend, the cranelift backend, static musl, etc. I found that none of them worked for us except using mold (which i have in my global configuration) and removing debuginfo. This PR adds
We have to try! I haven't checked how much it matters for that case |
Lets give it a try. |
Can I make this my default somehow? |
Except for aliases, i don't think so unfortunately |
Add a compile option
-p fast-build
for a 16% incremental compile speedup (linux) at the cost of having no debuginfo.After trying various rust compiler speedup suggestions, setting mold as my default linker and removing debuginfo are the only ones showing a speedup.