-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
derive various impls instead of hand-rolling them #101858
Conversation
This PR changes MIR cc @oli-obk, @RalfJung, @JakobDegen, @davidtwco, @celinval, @vakaras Some changes occurred to the CTFE / Miri engine cc @rust-lang/miri |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's better than what i've asked for 😁
one more idea, with or without it
r=me
@bors r=lcnr p=1 bitrotty |
☀️ Test successful - checks-actions |
Finished benchmarking commit (df34db9): comparison URL. Overall result: ❌✅ regressions and improvements - ACTION NEEDEDNext Steps: If you can justify the regressions found in this perf run, please indicate this with @rustbot label: +perf-regression Instruction countThis is a highly reliable metric that was used to determine the overall result at the top of this comment.
Max RSS (memory usage)ResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
Footnotes |
Looks like some genuine regressions. @oli-obk: how do the derived version differ from the hand-written ones? Type folding is typically quite hot, so small differences could easily have perf effects. |
I'll look into them. Most should be equivalent, I did check beforehand |
From the following diff I'm guessing that this PR caused some additional obligations to be generated or just processed.
|
@oli-obk This PR seems to have regressed the lift impl for
The |
match self { | ||
Some(x) => tcx.lift(x).map(Some), | ||
None => Some(None), | ||
} | ||
tcx.lift(self?).map(Some) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh... this is wrong now 🤦
Fix wrongly refactored Lift impl see rust-lang#101858 (comment) r? `@bjorn3`
Fix wrongly refactored Lift impl see rust-lang#101858 (comment) r? `@bjorn3`
Fix wrongly refactored Lift impl see rust-lang#101858 (comment) r? ``@bjorn3``
Fix perf regression from TypeVisitor changes Regression occurred in rust-lang#101858 (comment) Instead of just reverting, we only fixed part of the regression. The main regression was due to actually correctly visiting a type that contains types and consts and should therefor be visited. This is not actually observable (yet?), but we should still do it correctly instead of risking major bugs in the future.
Fix perf regression from TypeVisitor changes Regression occurred in rust-lang/rust#101858 (comment) Instead of just reverting, we only fixed part of the regression. The main regression was due to actually correctly visiting a type that contains types and consts and should therefor be visited. This is not actually observable (yet?), but we should still do it correctly instead of risking major bugs in the future.
Fix perf regression from TypeVisitor changes Regression occurred in rust-lang/rust#101858 (comment) Instead of just reverting, we only fixed part of the regression. The main regression was due to actually correctly visiting a type that contains types and consts and should therefor be visited. This is not actually observable (yet?), but we should still do it correctly instead of risking major bugs in the future.
r? @lcnr
This may not have been what you asked for in 964b97e#r84051418 but I got carried away while following the compiler team meeting today.