Skip to content

Commit d5d79ac

Browse files
authored
Rollup merge of #105010 - Neutron3529:patch-2, r=jyn514
Fix documentation of asymptotic complexity for rustc_data_structures::SortedMap https://users.rust-lang.org/t/is-the-document-in-sortedmap-in-rustc-data-structures-sorted-map-correct/84939 SortedMap have `O(n)` insertions and removal rather than `O(log(n))`
2 parents cea2e14 + 11525e5 commit d5d79ac

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

compiler/rustc_data_structures/src/sorted_map.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ mod index_map;
1010
pub use index_map::SortedIndexMultiMap;
1111

1212
/// `SortedMap` is a data structure with similar characteristics as BTreeMap but
13-
/// slightly different trade-offs: lookup, insertion, and removal are *O*(log(*n*))
14-
/// and elements can be iterated in order cheaply.
13+
/// slightly different trade-offs: lookup is *O*(log(*n*)), insertion and removal
14+
/// are *O*(*n*) but elements can be iterated in order cheaply.
1515
///
1616
/// `SortedMap` can be faster than a `BTreeMap` for small sizes (<50) since it
1717
/// stores data in a more compact way. It also supports accessing contiguous

0 commit comments

Comments
 (0)