MuseAir
MuseAir is a portable hashing algorithm that heavily optimized for performance and quality, incorporating structures never before implemented. Complete algorithm analysis is available in the repository.
-
Even faster, outperforming previous fastest wyhash and rapidhash.
-
Improved quality, not vulnerable to blinding multiplication like wyhash or rapidhash, making it ideal for persistent file formats or communication protocols (though note the algorithm is not yet stable).
-
Platform independent, no dependencies on specialized instruction sets like cryptography or vectorization, runs optimally on most 64-bit architectures.
-
Compile-time hashing, as the implementation is fully
const. -
No-std compatible, zero unsafe code and zero dependencies.
-
Non-cryptographic, not intended for security-critical applications.
Usage
let seed: u64 = 1123;
let v1: u64 = hash;
let v2: u64 = ;
let v3: u128 = hash_128;
let v4: u128 = ;
assert_eq!;
assert_eq!;
Use with hashmap
This crate provides helper types that require enabling the std feature.
use ;
let mut map = default;
map.insert;
let mut map = with_hasher;
map.insert;
Feature flags
std(enabled by default) - Enables [HashMap] and [HashSet] helper types.
Benchmarks
Benchmarks conducted on AMD Ryzen 7 5700G desktop.
Hashing bulk datas
Hashing small keys
Quality
All MuseAir variants have passed the complete SMHasher3 extended test suite (with --extra flag). As the de facto standard for non-cryptographic hashing quality, passing these tests confirms production readiness. See full results in the repository.
Versioning
The current MSRV (Minimum Supported Rust Version) is 1.83.0. MSRV changes are considered breaking changes.