Use wyhash for <til/hash.h> - #13686
Merged
1 commit merged intoAug 10, 2022
Merged
Conversation
Leonard Hecker (lhecker)
force-pushed
the
dev/lhecker/wyhash
branch
from
August 5, 2022 15:59
d9cb55d to
a2763e4
Compare
Leonard Hecker (lhecker)
force-pushed
the
dev/lhecker/wyhash
branch
from
August 5, 2022 16:33
42e5b8a to
0b0598d
Compare
Dustin L. Howett (DHowett)
approved these changes
Aug 5, 2022
Mike Griese (zadjii-msft)
approved these changes
Aug 10, 2022
Mike Griese (zadjii-msft)
left a comment
Member
There was a problem hiding this comment.
i-know-some-of-these-words.gif
|
Hello Leonard Hecker (@lhecker)! Because this pull request has the p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (
|
ghost
deleted the
dev/lhecker/wyhash
branch
August 10, 2022 21:11
This pull request was closed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
wyhash was chosen based on the results found in
smhasher, were it proveditself as an algorithm with little flaws and fairly high output quality.
While I have a personal preference for xxhash (XXH3 specifically), wyhash is a
better fit for this project as its source code is multiple magnitudes smaller,
simplifying the review and integration into the header-only
hash.hfile.For use with hashmaps the hash quality doesn't actually matter much for
optimal performance and instead the binary size usually matters more.
But even in that scenario wyhash is fairly close to FNV1a (aka "FNV64").
The result is that this new hash algorithm will only have little impact on
hashmap performance if used over the standard FNV1a as used in the STL,
while simultaneously offering a vastly better hash quality.
This partially solves #13124.
Validation Steps Performed