rust/src/libcollections
bors 1586005a1d Auto merge of #30534 - bluss:binary-heap-fast-pop, r=Gankro
BinaryHeap: Use full sift down in .pop()

.sift_down can either choose to compare the element on the way down (and
place it during descent), or to sift down an element fully, then sift
back up to place it.

A previous PR changed .sift_down() to the former behavior, which is much
faster for relatively small heaps and for elements that are cheap to
compare.

A benchmarking run suggested that BinaryHeap::pop() suffers
improportionally from this, and that it should use the second strategy
instead. It's logical since .pop() brings last element from the
heapified vector into index 0, it's very likely that this element will
end up at the bottom again.

Closes #29969
Previous PR #29811
2016-01-11 19:03:18 +00:00
..
btree Feature-gate defaulted type parameters outside of types. 2016-01-04 05:18:56 -05:00
binary_heap.rs BinaryHeap: Use full sift down in .pop() 2015-12-23 04:07:36 +01:00
borrow.rs rustfmt libcollections 2015-11-24 11:53:47 +13:00
enum_set.rs rustfmt libcollections 2015-11-24 11:53:47 +13:00
fmt.rs Review fixes 2015-11-18 01:24:22 +03:00
lib.rs Make LinkedList and its read-only iterators covariant 2015-12-31 15:22:22 -05:00
linked_list.rs Make LinkedList and its read-only iterators covariant 2015-12-31 15:22:22 -05:00
macros.rs Add note about clone in docs for vec![] 2015-09-07 03:57:20 +05:30
range.rs rustfmt libcollections 2015-11-24 11:53:47 +13:00
slice.rs doc: no need to duplicate docs on renamed API 2015-12-17 21:10:57 +02:00
str.rs Fix some links in str docs 2015-12-26 12:16:48 +01:00
string.rs Fix off-by-one in String::remove 2016-01-02 22:36:50 +01:00
vec.rs Auto merge of #30272 - tshepang:doc-drain, r=bluss 2015-12-18 05:05:09 +00:00
vec_deque.rs Auto merge of #30272 - tshepang:doc-drain, r=bluss 2015-12-18 05:05:09 +00:00