Avoid the would-change check for bitset chunks that are unique#153680
Avoid the would-change check for bitset chunks that are unique#153680Zalathar wants to merge 1 commit intorust-lang:mainfrom
Conversation
|
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
[EXPERIMENT] Avoid the would-change check for bitset chunks that are unique
This comment has been minimized.
This comment has been minimized.
This comment was marked as outdated.
This comment was marked as outdated.
9897ed8 to
8b13e1a
Compare
|
Whoops, it turns out that my previous benchmark run had a bug that would cause it to simply not perform certain ChunkedBitSet bulk updates at all, which is blatantly incorrect. 😅 This implies that I should probably also add some relevant unit tests. |
|
Let's try again with a version that actually performs real work. @bors try @rust-timer queue |
|
Awaiting bors try build completion. @rustbot label: +S-waiting-on-perf |
Avoid the would-change check for bitset chunks that are unique
|
Now there’s some kind of bug that causes the modified compiler to hang while building @bors try cancel |
|
Try build cancelled. Cancelled workflows: |
|
Closing this for now, as it needs better testing/debugging. |
|
Ah, I think the bug might have been in unconditionally returning This would then break code that relies on the return value when iterating to fixpoint, because it would incorrectly believe that fixpoint is never reached, and loop forever. |
ChunkedBitSet goes out of its way to check whether a union/subtract/intersect operation would actually modify any bits, to avoid calling
Rc::make_mutif possible.But in the case where the Rc is already unique (i.e.
Rc::get_mutsucceeds), it's cheaper to skip the would-change check entirely.would_modify_wordsmore vectorizer-friendly #153640.