-
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
Avoid accessing the HIR in the happy path of coherent_trait
#120835
Conversation
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
Avoid accessing the HIR in the happy path of `coherent_trait` based on rust-lang#120834 This may resolve part of the performance issue of rust-lang#120558
☀️ Try build successful - checks-actions |
This comment has been minimized.
This comment has been minimized.
Finished benchmarking commit (83055d7): comparison URL. Overall result: ✅ improvements - no action neededBenchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. While you can manually mark this PR as fit for rollup, we strongly recommend not doing so since this PR may lead to changes in compiler perf. @bors rollup=never 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.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 661.327s -> 661.647s (0.05%) |
The real diff (relative to the base PR) is https://perf.rust-lang.org/compare.html?start=7c638996380cc1b1285e6d37b124cce4e771e721&end=83055d7e543de346aba28b5fe67df824fa543e97&stat=instructions%3Au So still a visible improvement in secondary benchmarks. |
d8fa0d5
to
614ff0f
Compare
Great work! |
Bases it off master. Let's give it another spin. Though there are still some direct hir accesses in unsafety checking that i'm not sure how to fully eliminate @bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
Avoid accessing the HIR in the happy path of `coherent_trait` This may resolve part of the performance issue of rust-lang#120558
☀️ Try build successful - checks-actions |
This comment has been minimized.
This comment has been minimized.
Finished benchmarking commit (af14861): comparison URL. Overall result: no relevant changes - no action neededBenchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. While you can manually mark this PR as fit for rollup, we strongly recommend not doing so since this PR may lead to changes in compiler perf. @bors rollup=never Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)This benchmark run did not return any relevant results for this metric. 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.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 666.771s -> 666.754s (-0.00%) |
@bors r+ |
Merge `impl_polarity` and `impl_trait_ref` queries Hopefully this is perf neutral. I wan to finish rust-lang#120835 and stop using the HIR in `coherent_trait`, which should then give us a perf improvement.
☀️ Test successful - checks-actions |
Finished benchmarking commit (aebf451): comparison URL. Overall result: no relevant changes - no action needed@rustbot label: -perf-regression Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)This benchmark run did not return any relevant results for this metric. 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.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 663.665s -> 664.937s (0.19%) |
…rors Merge `impl_polarity` and `impl_trait_ref` queries Hopefully this is perf neutral. I want to finish rust-lang#120835 and stop using the HIR in `coherent_trait`, which should then give us a perf improvement.
Merge `impl_polarity` and `impl_trait_ref` queries Hopefully this is perf neutral. I want to finish rust-lang/rust#120835 and stop using the HIR in `coherent_trait`, which should then give us a perf improvement.
Merge `impl_polarity` and `impl_trait_ref` queries Hopefully this is perf neutral. I want to finish rust-lang/rust#120835 and stop using the HIR in `coherent_trait`, which should then give us a perf improvement.
Merge `impl_polarity` and `impl_trait_ref` queries Hopefully this is perf neutral. I want to finish rust-lang/rust#120835 and stop using the HIR in `coherent_trait`, which should then give us a perf improvement.
Unfortunately the hir is still used in unsafety checks, and we do not have a way to avoid that. An impl's unsafety is not part of any query other than hir.
So this PR does not affect perf, but could still be considered a cleanup