Skip to main content

hash_bytes

Function hash_bytes 

Source
pub fn hash_bytes(bytes: &[u8]) -> u64
Expand description

Hash arbitrary bytes deterministically. Used as the keying function for DHarht::insert_bytes and (post-Phase-11) as the canonical 64-bit content hash for ByteDictionary::seal_with_u64_hash_index.

Phase 9: switched from splitmix64+FNV folding to multiplicative hash on 8-byte chunks. Same determinism contract (no platform- dependent seeds, byte-equal across runs / machines), but ~5× faster on short keys because we skip the inner splitmix64 mixer per chunk. Final mix at the end folds in length to maintain distribution quality.