@@ -45,14 +45,14 @@ use ringbuf::RingBuf;
45
45
/// searches. However, this does mean that searches will have to do *more* comparisons on average.
46
46
/// The precise number of comparisons depends on the node search strategy used. For optimal cache
47
47
/// effeciency, one could search the nodes linearly. For optimal comparisons, one could search
48
- /// search the node using binary search. As a compromise, one could also perform a linear search
48
+ /// the node using binary search. As a compromise, one could also perform a linear search
49
49
/// that initially only checks every i<sup>th</sup> element for some choice of i.
50
50
///
51
51
/// Currently, our implementation simply performs naive linear search. This provides excellent
52
52
/// performance on *small* nodes of elements which are cheap to compare. However in the future we
53
53
/// would like to further explore choosing the optimal search strategy based on the choice of B,
54
54
/// and possibly other factors. Using linear search, searching for a random element is expected
55
- /// to take O(Blog <sub>B</sub>n) comparisons, which is generally worse than a BST. In practice,
55
+ /// to take O(B log <sub>B</sub>n) comparisons, which is generally worse than a BST. In practice,
56
56
/// however, performance is excellent. `BTreeMap` is able to readily outperform `TreeMap` under
57
57
/// many workloads, and is competetive where it doesn't. BTreeMap also generally *scales* better
58
58
/// than TreeMap, making it more appropriate for large datasets.
@@ -68,7 +68,7 @@ use ringbuf::RingBuf;
68
68
/// it's possible to force one to occur at every single level of the tree in a single insertion or
69
69
/// deletion. In fact, a malicious or otherwise unlucky sequence of insertions and deletions can
70
70
/// force this degenerate behaviour to occur on every operation. While the total amount of work
71
- /// done on each operation isn't *catastrophic*, and *is* still bounded by O(Blog <sub>B</sub>n),
71
+ /// done on each operation isn't *catastrophic*, and *is* still bounded by O(B log <sub>B</sub>n),
72
72
/// it is certainly much slower when it does.
73
73
#[ deriving( Clone ) ]
74
74
pub struct BTreeMap < K , V > {
0 commit comments