Skip to content

Port rust-lang/rust#78857 - Improve BinaryHeap performance #28

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jan 6, 2021

Conversation

SkiFire13
Copy link
Contributor

This is a port of rust-lang/rust#78857 which greatly improves the std's BinaryHeap's performance

@sekineh
Copy link
Owner

sekineh commented Jan 6, 2021

Thanks for the PR!
Looks good to me. It seems to have the same logic as the original PR.
I'm going to merge it.

@sekineh sekineh merged commit a505dde into sekineh:master Jan 6, 2021
@sekineh
Copy link
Owner

sekineh commented Jan 6, 2021

I've published v0.4.1 of the crate binary-heap-plus including this PR#.

@SkiFire13 SkiFire13 deleted the port-78857 branch January 6, 2021 09:51
clint-white added a commit to clint-white/binary-heap-plus-rs that referenced this pull request Aug 7, 2022
Port changes from rust-lang/rust related to binary heap performance and
use of unsafe:

- #81706: Document BinaryHeap unsafe functions
- #81127: Improve sift_down performance in BinaryHeap
- #58123: Avoid some bounds checks in binary_heap::{PeekMut,Hole}
- #72709: #[deny(unsafe_op_in_unsafe_fn)] in liballoc

Note that the following related rust-lang/rust PRs were already ported
here in earlier PRs:

- (in sekineh#28) #78857: Improve BinaryHeap performance
- (in sekineh#27) #75974: Avoid useless sift_down when
  std::collections::binary_heap::PeekMut is never mutably dereferenced
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants