-
Notifications
You must be signed in to change notification settings - Fork 13k
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
fast path for declared_generic_bounds_from_env #119084
Conversation
r? @b-naber (rustbot has picked a reviewer for you, use r? to override) |
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
fast path for declared_generic_bounds_from_env ~2% perf gain for diesel
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.
r=me after perf
(ty::Alias(_, a1), GenericKind::Alias(a2)) if a1.def_id != a2.def_id => { | ||
return None; | ||
} | ||
(ty::Param(p1), GenericKind::Param(p2)) if p1 != p2 => return None, | ||
_ => {} |
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.
(ty::Alias(_, a1), GenericKind::Alias(a2)) if a1.def_id != a2.def_id => { | |
return None; | |
} | |
(ty::Param(p1), GenericKind::Param(p2)) if p1 != p2 => return None, | |
_ => {} | |
(ty::Alias(_, a1), GenericKind::Alias(a2)) if a1.def_id == a2.def_id =>{} | |
(ty::Param(p1), GenericKind::Param(p2)) if p1 == p2 => {} | |
_ => return None, |
This should cover more cases.
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.
This is missing the case of GenericKind::Placeholder
.
☀️ Try build successful - checks-actions |
This comment has been minimized.
This comment has been minimized.
Finished benchmarking commit (e0a7b59): 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: 673.256s -> 671.287s (-0.29%) |
@rustbot author |
20e222a
to
27e964d
Compare
Added a comment about rigid alias types and implemented an alternative approach @rustbot review |
r=me |
This comment was marked as duplicate.
This comment was marked as duplicate.
@bors r=compiler-errors rollup=never |
☀️ Test successful - checks-actions |
@aliemjay: how did you find this improvement? Profiling, looking through the code, something else? I'm curious :) |
Finished benchmarking commit (57ad505): comparison URL. Overall result: ✅ improvements - no action needed@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.
Binary sizeResultsThis 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.
Bootstrap: 673.86s -> 671.988s (-0.28%) |
by callgrind profiles, looking at code that I have some expertise in so that I can easily catch optimazation opportunities. |
~2% perf gain for diesel