If you need to hash large data streams, multi-gigabyte files, or millions of database keys in real-time, xxHash is the clear winner. Security and Vulnerabilities The Failure of MD5 Security
MD5 was designed in 1991 as a cryptographic hash function. Its goal was to take an input of any length and produce a secure, unique 128-bit digital fingerprint. Cryptographic hashes are designed to be one-way functions; it should be computationally impossible to reverse the hash to find the original input, or to find two different inputs that produce the same hash. xxhash vs md5
Created by Yann Collet, xxHash is a non-cryptographic algorithm. It was born out of the LZ4 compression project to solve a specific problem: If you need to hash large data streams,
xxHash (specifically the xxHash64 variant) relies on "multiplication" and "rotation" of bits. It reads memory in large chunks (64-bit or 128-bit words) and mixes them rapidly. It does not try to hide the state or prevent reversing; it solely tries to distribute bits evenly and quickly. Cryptographic hashes are designed to be one-way functions;
This includes:
Do not confuse speed with security.
The only scenario where MD5 makes sense today is maintaining compatibility with legacy systems that haven't yet upgraded. However, even there, many teams are implementing migrations to xxHash to realize the substantial performance gains while retaining fallback support for older components.