auto merge of #19450 : jbapple/rust/pq-pop-time, r=Gankro

pop calls siftdown, siftdown calls siftdown_range, and siftdown_range
loops on an index that can start as low as 0 and approximately doubles
each iteration.
This commit is contained in:
bors 2014-12-02 02:52:15 +00:00
commit 8a210af7e5

View File

@ -10,8 +10,8 @@
//! A priority queue implemented with a binary heap. //! A priority queue implemented with a binary heap.
//! //!
//! Insertions have `O(log n)` time complexity and checking or popping the largest element is //! Insertion and popping the largest element have `O(log n)` time complexity. Checking the largest
//! `O(1)`. Converting a vector to a priority queue can be done in-place, and has `O(n)` //! element is `O(1)`. Converting a vector to a priority queue can be done in-place, and has `O(n)`
//! complexity. A priority queue can also be converted to a sorted vector in-place, allowing it to //! complexity. A priority queue can also be converted to a sorted vector in-place, allowing it to
//! be used for an `O(n log n)` in-place heapsort. //! be used for an `O(n log n)` in-place heapsort.
//! //!