Skip to content

Add link to closed PR for future optimizers of ChunkedBitSet relations #94709

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

Merged
merged 1 commit into from
Mar 8, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions compiler/rustc_index/src/bit_set.rs
Original file line number Diff line number Diff line change
Expand Up @@ -654,15 +654,19 @@ impl<T: Idx> BitRelations<ChunkedBitSet<T>> for ChunkedBitSet<T> {

impl<T: Idx> BitRelations<HybridBitSet<T>> for ChunkedBitSet<T> {
fn union(&mut self, other: &HybridBitSet<T>) -> bool {
// FIXME: this is slow if `other` is dense, and could easily be
// improved, but it hasn't been a problem in practice so far.
// FIXME: This is slow if `other` is dense, but it hasn't been a problem
// in practice so far.
// If a a faster implementation of this operation is required, consider
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tiny typo here and below

Suggested change
// If a a faster implementation of this operation is required, consider
// If a faster implementation of this operation is required, consider

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, that's stupid, thanks for catching it! Fixes in #94956

// reopening https://github.com/rust-lang/rust/pull/94625
assert_eq!(self.domain_size, other.domain_size());
sequential_update(|elem| self.insert(elem), other.iter())
}

fn subtract(&mut self, other: &HybridBitSet<T>) -> bool {
// FIXME: this is slow if `other` is dense, and could easily be
// improved, but it hasn't been a problem in practice so far.
// FIXME: This is slow if `other` is dense, but it hasn't been a problem
// in practice so far.
// If a a faster implementation of this operation is required, consider
// reopening https://github.com/rust-lang/rust/pull/94625
assert_eq!(self.domain_size, other.domain_size());
sequential_update(|elem| self.remove(elem), other.iter())
}
Expand Down