-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Reduce PlaceBuilder
cloning
#103947
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
Reduce PlaceBuilder
cloning
#103947
Conversation
r? @cjgillot (rustbot has picked a reviewer for you, use r? to override) |
@bors try @rust-timer queue |
Awaiting bors try build completion. @rustbot label: +S-waiting-on-perf |
⌛ Trying commit a725ae151ed917cfc41d742ee963609256a140b2 with merge 1606b503f0d3c68a726790c85dca681060ee46a0... |
☀️ Try build successful - checks-actions |
Queued 1606b503f0d3c68a726790c85dca681060ee46a0 with parent 2efb0cd, future comparison URL. |
Finished benchmarking commit (1606b503f0d3c68a726790c85dca681060ee46a0): 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.
|
let mut place = match place.try_upvars_resolved(cx) { | ||
Ok(val) | Err(val) => val, | ||
}; | ||
let _is_resolved = place.resolve_upvar_mut(cx); |
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.
Should we call to_place
directly here?
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.
No, that panics if the upvar can't be resolved.
a725ae1
to
9cf6ce0
Compare
I factored out |
Great, thanks! |
⌛ Testing commit 9cf6ce0 with merge 12079974cf83b9d5a93d614c89c466f90f162c46... |
@bors retry |
☀️ Test successful - checks-actions |
Finished benchmarking commit (80b3c6d): 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.
|
Reduce `PlaceBuilder` cloning Some API tweaks with an eye towards reducing clones.
Some API tweaks with an eye towards reducing clones.