From 4d38f15ede817548ffae1da49705489c1d735243 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gammels=C3=A6ter?= Date: Mon, 7 Mar 2022 19:06:42 +0100 Subject: [PATCH] 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. --- compiler/rustc_index/src/bit_set.rs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/compiler/rustc_index/src/bit_set.rs b/compiler/rustc_index/src/bit_set.rs index 12bde029494..d7e5c2b6056 100644 --- a/compiler/rustc_index/src/bit_set.rs +++ b/compiler/rustc_index/src/bit_set.rs @@ -654,15 +654,19 @@ impl BitRelations> for ChunkedBitSet { impl BitRelations> for ChunkedBitSet { fn union(&mut self, other: &HybridBitSet) -> 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.insert(elem), other.iter()) } fn subtract(&mut self, other: &HybridBitSet) -> 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()) }