cityhash
amazon-corretto-crypto-provider
cityhash | amazon-corretto-crypto-provider | |
---|---|---|
2 | 2 | |
1,054 | 215 | |
1.2% | 0.9% | |
0.0 | 8.0 | |
almost 2 years ago | 2 days ago | |
Shell | Java | |
MIT License | Apache License 2.0 |
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
amazon-corretto-crypto-provider
-
Use Fast Data Algorithms
I don't fully agree for two reasons.
First, I am not sure the data on most in-use hardware (e.g. EC2 m5/c5/i3en etc ...) supports your conclusions. xxHash is faster than crypto hashes always and BLAKE3 single threaded is faster on every Intel machine I've come across in wide deployment. I hear similar arguments around CRC-32 and to be frank it just isn't true on most computers most people run things on.
Second, many languages don't properly use the hardware instructions and if they do they often don't use them correctly. For example, Java 8 has bog slow SHA-1, AES-GCM and MD5 implementations, and switching to Amazon Coretto Crypto Provider was able to speed SHA/MD5 up by 50% and AES-GCM by ~90% on a reasonably large deployment (although the JDK wasn't using proper hardware instructions for AES-GCM until Java 9 I think it is still slower even after that).
That being said, like I disclaimed at the top of the benchmark your particular hardware and your particular language matters a lot.
[1] https://github.com/corretto/amazon-corretto-crypto-provider/...
-
What JCA Security Provider do you use for your Java applications?
If you need better performance (and are running Linux), use the Amazon Corretto Crypto Provider (disclaimer: I am one of its primary authors)
What are some alternatives?
xxHash - Extremely fast non-cryptographic hash algorithm
BLAKE3 - the official Rust and C implementations of the BLAKE3 cryptographic hash function
makeself - A self-extracting archiving tool for Unix systems, in 100% shell script.
SipHash - High-speed secure pseudorandom function for short messages
wyhash - The FASTEST QUALITY hash function, random number generators (PRNG) and hash map.