6 ms·
Ah yes, that's exactly what CRC32 is supposed to be used for. And it's even quicker if you don't compute it over the whole file, brilliant!
by matzf 5y ago
Ah yes, that's exactly what CRC32 is supposed to be used for. And it's even quicker if you don't compute it over the whole file, brilliant!
- pkolaczk 5y agoAFAIK CRCs are not the fastest "hashes" you can get. Some non-cryptographic hashes outperform crcs by a large factor and provide longer checksums and much better statistical properties. E.g. see this: * https://www.strchr.com/hash_functions https://www.strchr.com/hash_functions * https://jpountz.github.io/lz4-java/1.2.0/xxhash-benchmark/ https://jpountz.github.io/lz4-java/1.2.0/xxhash-benchmark/