-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Less duplication in activate #6967
Conversation
r? @nrc (rust_highfive has picked a reviewer for you, use r? to override) |
This is waiting on someone with a fairly powerful and idle computer doing a comparison of |
Did some quick measurements on my laptop (2.6GHz i7), average of 10 runs, with
|
Thanks for doing the work! Adding a % column,
That is a pretty significant cost. :-( |
@ehuss Can you share the |
One of the "background context" things I re-explained in #6919 (comment) is why we have checks in
RemainingCandidates::next
and inflag_activated
. "Why the duplication? Because cloning aBacktrackFrame
is more expensive than doing the work twice." But thanks to a lot of work, andim.rs
, the clone is now not so bad.This PR attempts to go all in on removing this duplication. Anything to simplify the resolver is good! But, this removes or hamstrings several important optimizations that make NOP builds fast. Specifically #5132 will kick in far less often. Alex, can you look at the times after/before this PR on some larger projects? You have seen this be slow with
perf record ./x.py build
before, but servo or cargo may be easy and interesting.Note that Master is at "Fast but duplicated" and this PR may be at "Slow but clean", the best solution may be somewhere in between.