about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2022-03-07 21:20:05 +0000
committerbors <bors@rust-lang.org>2022-03-07 21:20:05 +0000
commit89adcc636f94d34a6fc90fa117e28ddf6be7b983 (patch)
treededa1df63f4404ed37f6b5d3553cba74f6ef3be8
parent03918badd33d255de806b4a9a8aa75b031ed0738 (diff)
parent4d38f15ede817548ffae1da49705489c1d735243 (diff)
downloadrust-89adcc636f94d34a6fc90fa117e28ddf6be7b983.tar.gz
rust-89adcc636f94d34a6fc90fa117e28ddf6be7b983.zip
Auto merge of #94709 - martingms:link-to-chunked-opt-pr, r=nnethercote
Add link to closed PR for future optimizers of ChunkedBitSet relations

While optimizing these operations proved unfruitful w.r.t. improving compiler performance right now, faster versions might be needed at a later time. This PR adds a link in the FIXME to save any future optimizers some time, as requested by `@nnethercote` in https://github.com/rust-lang/rust/pull/94625.

r? `@nnethercote`
-rw-r--r--compiler/rustc_index/src/bit_set.rs12
1 files 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<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
+        // 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())
     }