-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Refactor Rc
and Arc
to use a prefix allocator
#84338
Conversation
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 fba9038 with merge 5ad6f8abe444911218eb868d3f12eb00538e1c3d... |
☀️ Try build successful - checks-actions |
Queued 5ad6f8abe444911218eb868d3f12eb00538e1c3d with parent 7d0132a, future comparison URL. |
Finished benchmarking try commit (5ad6f8abe444911218eb868d3f12eb00538e1c3d): comparison url. Benchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. Please note that if the perf results are neutral, you should likely undo the rollup=never given below by specifying Importantly, though, if the results of this run are non-neutral do not roll this PR up -- it will mask other regressions or improvements in the roll up. @bors rollup=never |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Rc
and Arc
metadata for uniform access via a PrefixAllocRc
and Arc
to use a prefix allocator
This comment has been minimized.
This comment has been minimized.
Rc::drop uses this when strong count is zero
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Awaiting bors try build completion. @rustbot label: +S-waiting-on-perf |
⌛ Trying commit 7944de5 with merge 609c7190b20ab83f97550c10f0e98b03cb3b80bc... |
☀️ Try build successful - checks-actions |
Queued 609c7190b20ab83f97550c10f0e98b03cb3b80bc with parent bf24e6b, future comparison URL. |
Finished benchmarking try commit (609c7190b20ab83f97550c10f0e98b03cb3b80bc): comparison url. Benchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. Please note that if the perf results are neutral, you should likely undo the rollup=never given below by specifying Importantly, though, if the results of this run are non-neutral do not roll this PR up -- it will mask other regressions or improvements in the roll up. @bors rollup=never |
The main regression comes from the optimizing path in LLVM (
Lines: 68053, Copies: 3117 |
@bors try @rust-timer queue |
Awaiting bors try build completion. @rustbot label: +S-waiting-on-perf |
⌛ Trying commit a4b4fe4 with merge 205b6d4448728ebbc7f6414144db71d394ca9cb2... |
☀️ Try build successful - checks-actions |
Queued 205b6d4448728ebbc7f6414144db71d394ca9cb2 with parent 86ac0b4, future comparison URL. |
Finished benchmarking try commit (205b6d4448728ebbc7f6414144db71d394ca9cb2): comparison url. Benchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. Please note that if the perf results are neutral, you should likely undo the rollup=never given below by specifying Importantly, though, if the results of this run are non-neutral do not roll this PR up -- it will mask other regressions or improvements in the roll up. @bors rollup=never |
This comment has been minimized.
This comment has been minimized.
This is still a pretty significant compilation time regression. I don't think we can land this as it is. |
Ping from triage: @rustbot label: -S-waiting-on-review +S-waiting-on-author |
@TimDiekmann Ping from triage, any updates on this? |
Sadly I wasn't able to make further optimizations, so I close that for now. |
This picks up #80273 and splits the inner part of
(A)Rc
into two. Both structs are now allocated as if they were allocated with a prefix allocator, which may be useful in the future. For now, the allocator is gated behindallocator_api_internals
.The
Tracker
-allocator is used in tests to ensure that the safety rules are not violated.r? @Amanieu
This requires a perf-run.
Update: 2021/04/22: With this,
Rc
andArc
now stores the pointer returned from the allocator, i.e. it points toT
directly because accessing the data in smart pointers is more common thancopyingcloning the smart pointer. The layout of the allocation didn't change.