diff options
| author | Ralf Jung <post@ralfj.de> | 2020-04-15 17:07:13 +0200 |
|---|---|---|
| committer | Ralf Jung <post@ralfj.de> | 2020-04-15 17:07:13 +0200 |
| commit | 818bef55584943a5ae1199c9c481f15df4490041 (patch) | |
| tree | ff215e535d69ee1525ee09b17a300662e6d46052 /src/liballoc/collections | |
| parent | 88612e3657ce48f3d8ec25f699f8b9c1e55889bf (diff) | |
| download | rust-818bef55584943a5ae1199c9c481f15df4490041.tar.gz rust-818bef55584943a5ae1199c9c481f15df4490041.zip | |
don't specify log base in big-O
Diffstat (limited to 'src/liballoc/collections')
| -rw-r--r-- | src/liballoc/collections/binary_heap.rs | 4 | ||||
| -rw-r--r-- | src/liballoc/collections/btree/map.rs | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/liballoc/collections/binary_heap.rs b/src/liballoc/collections/binary_heap.rs index 00108344697..03c9164fb90 100644 --- a/src/liballoc/collections/binary_heap.rs +++ b/src/liballoc/collections/binary_heap.rs @@ -622,7 +622,7 @@ impl<T: Ord> BinaryHeap<T> { // `rebuild` takes O(len1 + len2) operations // and about 2 * (len1 + len2) comparisons in the worst case - // while `extend` takes O(len2 * log_2(len1)) operations + // while `extend` takes O(len2 * log(len1)) operations // and about 1 * len2 * log_2(len1) comparisons in the worst case, // assuming len1 >= len2. #[inline] @@ -643,7 +643,7 @@ impl<T: Ord> BinaryHeap<T> { /// The remaining elements will be removed on drop in heap order. /// /// Note: - /// * `.drain_sorted()` is `O(n * lg(n))`; much slower than `.drain()`. + /// * `.drain_sorted()` is `O(n * log(n))`; much slower than `.drain()`. /// You should use the latter for most cases. /// /// # Examples diff --git a/src/liballoc/collections/btree/map.rs b/src/liballoc/collections/btree/map.rs index d18b53fea08..29ec602dce1 100644 --- a/src/liballoc/collections/btree/map.rs +++ b/src/liballoc/collections/btree/map.rs @@ -40,7 +40,7 @@ use UnderflowResult::*; /// performance on *small* nodes of elements which are cheap to compare. However in the future we /// would like to further explore choosing the optimal search strategy based on the choice of B, /// and possibly other factors. Using linear search, searching for a random element is expected -/// to take O(B * log<sub>B</sub>(n)) comparisons, which is generally worse than a BST. In practice, +/// to take O(B * log(n)) comparisons, which is generally worse than a BST. In practice, /// however, performance is excellent. /// /// It is a logic error for a key to be modified in such a way that the key's ordering relative to |
