diff --git a/src/liballoc/collections/binary_heap.rs b/src/liballoc/collections/binary_heap.rs index a171f128c24d6..9da7f8711c288 100644 --- a/src/liballoc/collections/binary_heap.rs +++ b/src/liballoc/collections/binary_heap.rs @@ -165,6 +165,10 @@ use super::SpecExtend; /// trait, changes while it is in the heap. This is normally only possible /// through `Cell`, `RefCell`, global state, I/O, or unsafe code. /// +/// The costs of `push` and `pop` and `peek` can be performed in `O(1)` time. +/// Note that these are non-amortized costs. The amortized cost for `push` +/// and `pop` are `O(log(N))` due to re-allocations and maintaining the heap property. +/// /// # Examples /// /// ```