-
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 cloning refcounted types during folding #91353
Conversation
@bors try @rust-timer queue |
Awaiting bors try build completion. @rustbot label: +S-waiting-on-perf |
⌛ Trying commit 7e56cba8813a2b42dc593680b9c1c3b1c73495fc with merge e4a148d67d908f3377edf425472464853ddecbad... |
☀️ Try build successful - checks-actions |
Queued e4a148d67d908f3377edf425472464853ddecbad with parent 44723c5, future comparison URL. |
Finished benchmarking commit (e4a148d67d908f3377edf425472464853ddecbad): comparison url. Summary: This benchmark run did not return any relevant changes. 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 led to changes in compiler perf. @bors rollup=never |
afaik @bors delegate+ |
This comment has been minimized.
This comment has been minimized.
✌️ @eggyal can now approve this pull request |
f5b70fa
to
8aea3c5
Compare
@bors try @rust-timer queue |
Insufficient permissions to issue commands to rust-timer. |
⌛ Trying commit 8aea3c54f92c39f74961ccb9c1a9df41abd0e060 with merge 61c0f6be8fa61b1982ad10d83cd8c32f4ea25e77... |
I've pushed a version that avoids those clones if possible. Can you request that rust-timer do a perf-run? Then obvs will need a thorough review. Or else am happy to roll back to the previous version. |
8aea3c5
to
2581670
Compare
This comment has been minimized.
This comment has been minimized.
@bors try @rust-timer queue |
Awaiting bors try build completion. @rustbot label: +S-waiting-on-perf |
⌛ Trying commit 2581670e9a9c7071de095dc5ec85165e9d108cb8 with merge 4f6356ed89d4f4988faf7d95a399ff6669718e4a... |
☀️ Try build successful - checks-actions |
Queued 4f6356ed89d4f4988faf7d95a399ff6669718e4a with parent 0b42dea, future comparison URL. |
Finished benchmarking commit (4f6356ed89d4f4988faf7d95a399ff6669718e4a): comparison url. Summary: This benchmark run did not return any relevant changes. 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 led to changes in compiler perf. @bors rollup=never |
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.
alright, the impl looks good to me.
Please add some comments to explain what's going on here though.
I think that in the lines
let mut unique = Rc::from_raw(Rc::into_raw(self).cast());
it makes sense to explicitly mention the type of unique
somewhere, either in Rc::<...>::from_raw
, in cast::<...>
or as the type of unique
itself. Same for Arc
.
r=me with some helpful comments
2581670
to
d074395
Compare
d074395
to
5920a1d
Compare
@bors r=lcnr |
📌 Commit 5920a1d has been approved by |
good comments ❤️ |
☀️ Test successful - checks-actions |
Finished benchmarking commit (1796de7): comparison url. Summary: This benchmark run did not return any relevant changes. If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf. @rustbot label: -perf-regression |
Addresses FIXME comment created in #78313
r? @lcnr