Borrowck: refactor visited map to a bitset#81132
Conversation
|
(rust-highfive has picked a reviewer for you, use r? to override) |
|
@bors try @rust-timer queue |
|
Awaiting bors try build completion. |
|
⌛ Trying commit d04d2bdfa059446cf0da95c009f74a83fe4fd41e with merge 0b6d71c7205bc7c53a47894438791fc10a21a488... |
|
☀️ Try build successful - checks-actions |
|
Queued 0b6d71c7205bc7c53a47894438791fc10a21a488 with parent 4253153, future comparison URL. @rustbot label: +S-waiting-on-perf |
|
That map can actually be a set (lo is only used for the first bb), so I'll have more changes on this. |
|
Finished benchmarking try commit (0b6d71c7205bc7c53a47894438791fc10a21a488): 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 difference is indistinguishable from noise. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
1ca95fa to
4b856c1
Compare
|
@bors try @rust-timer queue |
|
Awaiting bors try build completion. |
|
⌛ Trying commit 4b856c166d1460b32c4f85f27c0fb50ff959ab5e with merge ff419a899d3f37d41aff12dc6410c294b64a4f08... |
|
☀️ Try build successful - checks-actions |
|
Queued ff419a899d3f37d41aff12dc6410c294b64a4f08 with parent 73f233b, future comparison URL. @rustbot label: +S-waiting-on-perf |
|
Finished benchmarking try commit (ff419a899d3f37d41aff12dc6410c294b64a4f08): 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 |
Reuse as much memory as possible, reduce number of allocations. Use BitSet instead of a HashMap, since only a single bit of information was used as the map's value.
4b856c1 to
46f3045
Compare
|
@bors r+ |
|
📌 Commit 46f3045 has been approved by |
This comment has been minimized.
This comment has been minimized.
|
@matthewjasper sorry I snuck in an after-last-minute change, |
There was a problem hiding this comment.
Clone is unnecessary here
There was a problem hiding this comment.
OMG thanks for noticing!
ec3f9db to
5271c62
Compare
|
@bors r+ |
|
📌 Commit 5271c62 has been approved by |
|
☀️ Test successful - checks-actions |
This PR refactors
Borrowsand theprecompute_borrows_out_of_scopefunction so that this initial phase has a much reduced memory pressure. This is achieved by reducing what is stored on the heap, and also reusing heap memory as much as possible.