This online tool allows you to generate the hash xxh64 of any string.
XXH64 length is 16 characters
Hash available
MD2 Hash, MD4 Hash, MD5 Hash, SHA1 Hash, SHA224 Hash, SHA256 Hash, SHA384 Hash, SHA512/224 Hash, SHA512/256 Hash, SHA512 Hash, SHA3-224 Hash, SHA3-256 Hash, SHA3-384 Hash, SHA3-512 Hash, RIPEMD128 Hash, RIPEMD160 Hash, RIPEMD256 Hash, RIPEMD320 Hash, WHIRLPOOL Hash, TIGER128,3 Hash, TIGER160,3 Hash, TIGER192,3 Hash, TIGER128,4 Hash, TIGER160,4 Hash, TIGER192,4 Hash, SNEFRU Hash, SNEFRU256 Hash, GOST Hash, GOST-CRYPTO Hash, ADLER32 Hash, CRC32 Hash, CRC32B Hash, CRC32C Hash, FNV132 Hash, FNV1A32 Hash, FNV164 Hash, FNV1A64 Hash, JOAAT Hash, MURMUR3A Hash, MURMUR3C Hash, MURMUR3F Hash, XXH32 Hash, XXH64 Hash, XXH3 Hash, XXH128 Hash, HAVAL128,3 Hash, HAVAL160,3 Hash, HAVAL192,3 Hash, HAVAL224,3 Hash, HAVAL256,3 Hash, HAVAL128,4 Hash, HAVAL160,4 Hash, HAVAL192,4 Hash, HAVAL224,4 Hash, HAVAL256,4 Hash, HAVAL128,5 Hash, HAVAL160,5 Hash, HAVAL192,5 Hash, HAVAL224,5 Hash, HAVAL256,5 Hash,
What is XXH64?
XXH64 is the 64-bit variant of the xxHash family, designed to provide high-speed, non-cryptographic hashing by fully exploiting 64-bit CPU architectures. While XXH32 is optimized for 32-bit registers, XXH64 scales the internal state and the mixing logic to process larger blocks of data per clock cycle. It is the go-to solution for modern 64-bit systems where throughput is the primary performance requirement.
How does XXH64 hash works?
XXH64 achieves its speed through a sophisticated pipeline that minimizes dependencies between instructions:
- Initialization: It initializes four independent 64-bit accumulators with specific prime seeds to ensure distinct hash states.
- Main Loop: The algorithm processes input in 32-byte chunks. For each chunk, it performs a series of multiplications by large primes (
0x9E3779B1and0x85EBCA77), followed by bitwise rotations. By using 64-bit arithmetic, it packs more data into every operation compared to the 32-bit version. - Stream Parallelism: The four accumulators process different parts of the data stream in parallel, effectively hiding memory latency behind CPU-side calculations.
- Finalization: After the loop finishes, the four accumulators are merged using a final mixing sequence to distribute entropy across the entire 64-bit result, ensuring high-quality hash distribution.
Comparison: XXH64 vs. XXH32
The choice between these two versions depends strictly on the hardware architecture and the required output size:
- Hardware Optimization: XXH64 is significantly faster than XXH32 on 64-bit CPUs because it processes data in 8-byte (64-bit) words instead of 4-byte (32-bit) words. Using XXH32 on a 64-bit machine essentially ignores half of the CPU's register width capability.
- Hash Collision Probability: XXH64 produces a 64-bit output, offering a massive $2^{64}$ keyspace. This makes it substantially more collision-resistant than the 32-bit XXH32, making it safer for very large datasets (e.g., billions of items in a hash map).
- Portability vs. Efficiency: XXH32 remains relevant for 32-bit embedded systems or specific protocols that strictly require a 32-bit identifier. However, for any modern desktop, server, or cloud environment, XXH64 is the standard choice for superior speed and entropy.