Skip to content
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

Change the default hasher to foldhash #563

Merged
merged 1 commit into from
Oct 1, 2024
Merged

Conversation

Amanieu
Copy link
Member

@Amanieu Amanieu commented Oct 1, 2024

Foldhash performs generally better than AHash while still avoiding the pitfalls of FxHash with certain distributions (such as only hashing aligned values).

[Foldhash](https://github.com/orlp/foldhash) performs generally better
than AHash while still avoiding the pitfalls of FxHash with certain
distributions (such as only hashing aligned values).
@Amanieu
Copy link
Member Author

Amanieu commented Oct 1, 2024

@bors r+

@bors
Copy link
Contributor

bors commented Oct 1, 2024

📌 Commit 7762511 has been approved by Amanieu

It is now in the queue for this repository.

@bors
Copy link
Contributor

bors commented Oct 1, 2024

⌛ Testing commit 7762511 with merge cd623c4...

@bors
Copy link
Contributor

bors commented Oct 1, 2024

☀️ Test successful - checks-actions
Approved by: Amanieu
Pushing cd623c4 to master...

@bors bors merged commit cd623c4 into rust-lang:master Oct 1, 2024
24 checks passed
mergify bot pushed a commit to libp2p/rust-libp2p that referenced this pull request Jan 2, 2025
Similar to #5738,  [`foldhash`](https://crates.io/crates/foldhash) is the dependency that requires it. It was introduced by `hashbrown` which is dependency of a lot of crates [here](rust-lang/hashbrown#563).
`hashbrown` is MIT, and Zlib is also an Open Source Initiative [approved license](https://opensource.org/license/zlib).

If you prefer we can also do as the upstream `cargo-deny` do and just add `foldhash` [to the exceptions](https://github.com/EmbarkStudios/cargo-deny/pull/618/files#diff-1040309c64844eb1b6b63d8fd67938adbf9461f1b3c61f12cf738f064a02d3deR56) but I can't see any advantage to it.
Cc @hanabi1224

Pull-Request: #5769.
jxs added a commit to jxs/rust-libp2p that referenced this pull request Jan 6, 2025
Similar to libp2p#5738,  [`foldhash`](https://crates.io/crates/foldhash) is the dependency that requires it. It was introduced by `hashbrown` which is dependency of a lot of crates [here](rust-lang/hashbrown#563).
`hashbrown` is MIT, and Zlib is also an Open Source Initiative [approved license](https://opensource.org/license/zlib).

If you prefer we can also do as the upstream `cargo-deny` do and just add `foldhash` [to the exceptions](https://github.com/EmbarkStudios/cargo-deny/pull/618/files#diff-1040309c64844eb1b6b63d8fd67938adbf9461f1b3c61f12cf738f064a02d3deR56) but I can't see any advantage to it.
Cc @hanabi1224

Pull-Request: libp2p#5769.
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