cityhash
wyhash
cityhash | wyhash | |
---|---|---|
2 | 9 | |
1,054 | 916 | |
1.2% | - | |
0.0 | 6.6 | |
almost 2 years ago | 3 months ago | |
Shell | C | |
MIT License | The Unlicense |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
cityhash
-
What hash function you use for hash maps / hash tables?
However, it's not the fastest. I found that Google CityHash was faster and produced slightly different hashvals. This was tested on billions of entries. https://github.com/google/cityhash
- Use Fast Data Algorithms
wyhash
- Wyhash: The fastest quality hash function
-
What hash function you use for hash maps / hash tables?
I recently switched to wyhash as it seems to have a good combination of speed and stability.
-
Are there any weaker hashes than MD5, but still randomly distributed?
wyhash is a decent option for if you don't need a cryptographical quality hash
-
Hacker News top posts: Mar 15, 2021
New Bare Hash Map: 2X-3X Speedup over SOTA\ (32 comments)
-
New Bare Hash Map: 2X-3X Speedup over SOTA
I feel like you’d want something a bit safer than “we don’t store the keys and just rely on the hash to be really good” [1], putting “please do not use this for serious tasks” in a comment embedded in the header file isn’t a clear enough warning.
It’s not clear to me that that probability of collision assumptions hold. It’s basically assuming that the hashing is perfect and distributes any inputs to the full 64-bit space with uniform probability. That’s the usual hash map / randomized algorithm hope, but does BigCrush or similar avalanche testing really prove that? (Presumably not, otherwise there wouldn’t be image attacks for things like md5).
[1] https://github.com/wangyi-fudan/wyhash/blob/d2a305811972f391...
- wyhash and wyrand are a non-cryptographic 64-bit hash function and PRNG respectively
What are some alternatives?
xxHash - Extremely fast non-cryptographic hash algorithm
smhasher - Hash function quality and speed tests
BLAKE3 - the official Rust and C implementations of the BLAKE3 cryptographic hash function
aHash - aHash is a non-cryptographic hashing algorithm that uses the AES hardware instruction
SipHash - High-speed secure pseudorandom function for short messages
meow_hash - Official version of the Meow hash, an extremely fast level 1 hash
amazon-corretto-crypto-provider - The Amazon Corretto Crypto Provider is a collection of high-performance cryptographic implementations exposed via standard JCA/JCE interfaces.
leocad - A CAD application for creating virtual LEGO models
makeself - A self-extracting archiving tool for Unix systems, in 100% shell script.
smhasher - Automatically exported from code.google.com/p/smhasher
Mersenne-Twister-in-Python - A Mersenne Twister Random Number Generator
countwords - Playing with counting word frequencies (and performance) in various languages.