-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
interpret: make some large types not Copy #99309
Conversation
Some changes occurred to MIR optimizations cc @rust-lang/wg-mir-opt Some changes occurred to the CTFE / Miri engine cc @rust-lang/miri |
ace3d37
to
d901858
Compare
@bors try @rust-timer queue |
Awaiting bors try build completion. @rustbot label: +S-waiting-on-perf |
Awaiting bors try build completion. @rustbot label: +S-waiting-on-perf |
@bors try @rust-timer queue |
Awaiting bors try build completion. @rustbot label: +S-waiting-on-perf |
⌛ Trying commit d90185827ab6d18956cf668fed302f01ee721eed with merge e43644679e78da80484751bc69eb266a1e5ba8e3... |
☀️ Try build successful - checks-actions |
Queued e43644679e78da80484751bc69eb266a1e5ba8e3 with parent e6c43cf, future comparison URL. |
Finished benchmarking commit (e43644679e78da80484751bc69eb266a1e5ba8e3): comparison url. Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)Results
CyclesThis benchmark run did not return any relevant results for this metric. If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf. Benchmarking 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 Footnotes |
let value = | ||
if i == index { *elem } else { self.mplace_index(&input, i)?.into() }; | ||
let value = if i == index { | ||
elem.clone() |
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 not going to matter much in the grand scheme of things by saving one (1) clone per call to this intrinsic, but this one should be easy to remove by calling copy_op
in the branches ^^
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.
Yeah I considered this and decided, for the reasons you mentioned, that reducing code duplication is more important.
r=me after a rebase |
d901858
to
213a25d
Compare
Oh, bors didn't mention the conflict, strange. @bors r=oli-obk |
☀️ Test successful - checks-actions |
Tested on commit rust-lang/rust@29c5a02. Direct link to PR: <rust-lang/rust#99309> 💔 miri on windows: test-fail → build-fail (cc @RalfJung @oli-obk). 💔 miri on linux: test-fail → build-fail (cc @RalfJung @oli-obk).
Finished benchmarking commit (29c5a02): comparison url. Instruction count
Max RSS (memory usage)Results
CyclesThis benchmark run did not return any relevant results for this metric. If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf. @rustbot label: -perf-regression Footnotes |
weird, the previous perf run was clean. Inlining threshold noise I guess? |
|
Also remove some unused trait impls (mostly HashStable).
This didn't find any unnecessary copies that I managed to avoid, but it might still be better to require explicit clone for these types? Not sure.
r? @oli-obk