-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Regression of compilation times on the latest nightly (2018-03-20) #49237
Comments
cc @rust-lang/compiler -- can we assign someone to investigate? |
@oli-obk Could this be Miri? |
Yes this is very likely to be miri related. It has a lot of constants if I understand it correctly. It also looks like the collector and trans take up most of the time. This makes sense as we now collect all constants, which we didn't before. These private constants shouldn't be collected though. |
cc @eddyb |
triage: P-high |
Looks like the fearless @oli-obk is on it |
The Anyways, the fix works locally |
On nightly replacing |
…er,eddyb Remove slow HashSet during miri stack frame creation fixes rust-lang#49237 probably has a major impact on rust-lang#48846 r? @michaelwoerister cc @eddyb I know you kept telling me to use vectors instead of hash containers... Now I know why.
…er,eddyb Remove slow HashSet during miri stack frame creation fixes rust-lang#49237 probably has a major impact on rust-lang#48846 r? @michaelwoerister cc @eddyb I know you kept telling me to use vectors instead of hash containers... Now I know why.
…er,eddyb Remove slow HashSet during miri stack frame creation fixes rust-lang#49237 probably has a major impact on rust-lang#48846 r? @michaelwoerister cc @eddyb I know you kept telling me to use vectors instead of hash containers... Now I know why.
On 2018-03-26 nightly compilation times become better, but still ~4 times slower compared to 1.24 stable:
|
I'll investigate. I removed P-high, because while a 4x regression is bad, manually unrolling loops is a corner case (2k unrolled loop bodies in a single function is a lot of copies of the same code!) |
Note that I've changed the code, now it does not unroll the main loop (thus it generates 24 times less code), to test the old version see rev a417e97. |
triage: P-medium downgrading to P-medium since oli-obk is investigating and we do not feel need to revisit at the weekly compiler team meeting. |
So... the regressions visible in -Ztime-passes are:
Some info:
Note that |
Ping @oli-obk! We're approaching the release of 1.26, do we want to get this regression fixed? |
I'll see if I find some time. no promises |
cc @wesleywiser you expressed interest in looking at const eval perf issues |
We've done major perf improvements in this area. I don't really know if this issue is actionable anymore after all this time. |
There is still a small ~20% regression:
But I guess it's small enough for this issue to be closed. |
For keccak crate I use simple loop unrolling macros:
Which combined generate a lot of unrolled code as a final result. On the latest Nightly it takes a lot more time to compile the crate than previously:
Here I've used only 10 iterations instead of 24 in the
unroll24
macro, full version takes more than several minutes to compile. Judging bycargo check
warnings expansion takes approximately the same time and the drastic difference comes from later stages.EDIT:
RUSTFLAGS="-Z time-passes" rustup run nightly cargo build
produces the following result:Click to expand
The text was updated successfully, but these errors were encountered: