diff options
| author | Han Mertens <hanmertens@outlook.com> | 2021-01-17 17:49:02 +0100 |
|---|---|---|
| committer | Han Mertens <hanmertens@outlook.com> | 2021-02-21 16:18:52 +0100 |
| commit | 095bf01649a202b088c817bcdd3612d2604187e0 (patch) | |
| tree | 4b1483f6d17aa6a90f00008f7439c838ea1f1034 /compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp | |
| parent | 3e826bb11228508fbe749e594038d6727208aa94 (diff) | |
| download | rust-095bf01649a202b088c817bcdd3612d2604187e0.tar.gz rust-095bf01649a202b088c817bcdd3612d2604187e0.zip | |
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.
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp')
0 files changed, 0 insertions, 0 deletions
