diff options
| author | Rémy Rakic <remy.rakic+github@gmail.com> | 2025-01-07 15:30:21 +0000 |
|---|---|---|
| committer | Rémy Rakic <remy.rakic+github@gmail.com> | 2025-01-11 11:34:03 +0000 |
| commit | d1f8a2c109614b2d9d8432a61b0aa18f050ec1d8 (patch) | |
| tree | 0ba78d9e1ad803f7f37cfbb083f6837d6cc38b74 | |
| parent | a13354bea05968799a5be5521691322274fa6a9e (diff) | |
| download | rust-d1f8a2c109614b2d9d8432a61b0aa18f050ec1d8.tar.gz rust-d1f8a2c109614b2d9d8432a61b0aa18f050ec1d8.zip | |
document the use-cases of `DenseBitSet` a bit more
| -rw-r--r-- | compiler/rustc_index/src/bit_set.rs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/compiler/rustc_index/src/bit_set.rs b/compiler/rustc_index/src/bit_set.rs index 73dd040a69c..d93707b745d 100644 --- a/compiler/rustc_index/src/bit_set.rs +++ b/compiler/rustc_index/src/bit_set.rs @@ -97,7 +97,13 @@ macro_rules! bit_relations_inherent_impls { /// A fixed-size bitset type with a dense representation. /// -/// NOTE: Use [`GrowableBitSet`] if you need support for resizing after creation. +/// Note 1: Since this bitset is dense, if your domain is big, and/or relatively +/// homogeneous (for example, with long runs of bits set or unset), then it may +/// be preferable to instead use a [MixedBitSet], or an +/// [IntervalSet](crate::interval::IntervalSet). They should be more suited to +/// sparse, or highly-compressible, domains. +/// +/// Note 2: Use [`GrowableBitSet`] if you need support for resizing after creation. /// /// `T` is an index type, typically a newtyped `usize` wrapper, but it can also /// just be `usize`. |
