Han Mertens 095bf01649 Improve sift_down performance in BinaryHeap
Because child > 0, the two statements are equivalent, but using
saturating_sub and <= yields in faster code. This is most notable in the
binary_heap::bench_into_sorted_vec benchmark, which shows a speedup of
1.26x, which uses sift_down_range internally. The speedup of pop (that
uses sift_down_to_bottom internally) is much less significant as the
sifting method is not called in a loop.
2021-02-21 16:18:52 +01:00
..
2020-09-29 21:39:24 +08:00
2021-02-13 11:18:36 +08:00
2021-01-07 16:16:36 +09:00