Skip to content

Commit 4d38f15

Browse files
committed
Add comment linking to closed PR for future optimizers
While optimizing these operations proved unfruitful w.r.t. improving compiler performance right now, faster versions might be needed at a later time.
1 parent 297273c commit 4d38f15

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

compiler/rustc_index/src/bit_set.rs

+8-4
Original file line numberDiff line numberDiff line change
@@ -654,15 +654,19 @@ impl<T: Idx> BitRelations<ChunkedBitSet<T>> for ChunkedBitSet<T> {
654654

655655
impl<T: Idx> BitRelations<HybridBitSet<T>> for ChunkedBitSet<T> {
656656
fn union(&mut self, other: &HybridBitSet<T>) -> bool {
657-
// FIXME: this is slow if `other` is dense, and could easily be
658-
// improved, but it hasn't been a problem in practice so far.
657+
// FIXME: This is slow if `other` is dense, but it hasn't been a problem
658+
// in practice so far.
659+
// If a a faster implementation of this operation is required, consider
660+
// reopening https://github.com/rust-lang/rust/pull/94625
659661
assert_eq!(self.domain_size, other.domain_size());
660662
sequential_update(|elem| self.insert(elem), other.iter())
661663
}
662664

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

0 commit comments

Comments
 (0)