Non-cryptographic hash for cache key
Open
New Feature
Stale
- Dominant language
- C++
- Stars
- 2k
- Forks
- 874
- Avg merge
- 6d 15h
- Merged PRs (30d)
- 46
Description
We found that OpenSSL's md5 is expensive (#8719). Replacing the library is an approach, but I start wondering we really need a cryptographic hash here.
#8755 is a PoC of using non-cryptographic hash for URL hash. If we look at collision ratio and benchmarks, the xxhash looks good for this use case.
- https://github.com/Cyan4973/xxHash/wiki/Collision-ratio-comparison
- https://github.com/Cyan4973/xxHash/wiki/Performance-comparison
A concern is when we change the hash algorithm, the cache needs to be cleared once.
Contributor guide
Assessment
This issue has not been assessed yet.