Crates.io | museair |
lib.rs | museair |
version | 0.4.0 |
created_at | 2024-08-14 16:58:54.181707+00 |
updated_at | 2025-07-24 11:02:23.156973+00 |
description | A portable hashing algorithm that heavily optimized for performance and quality, incorporating structures never before implemented. |
homepage | |
repository | https://github.com/eternal-io/museair |
max_upload_size | |
id | 1337754 |
size | 57,293 |
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.
let seed: u64 = 1123;
let v1: u64 = museair::hash("K--Aethiax".as_bytes(), seed);
let v2: u64 = {
let mut hasher = museair::Hasher::new(seed);
hasher.write("K--Ae".as_bytes());
hasher.write("thiax".as_bytes());
hasher.finish()
};
let v3: u128 = museair::hash_128("K--Aethiax".as_bytes(), seed);
let v4: u128 = {
let mut hasher = museair::Hasher::new(seed);
hasher.write("K--Ae".as_bytes());
hasher.write("thiax".as_bytes());
hasher.finish_128()
};
assert_eq!(v1, v2);
assert_eq!(v3, v4);
This crate provides helper types that require enabling the std
feature.
use museair::{HashMap, FixedState};
let mut map = HashMap::default();
map.insert("hello", "world");
let mut map = HashMap::with_hasher(FixedState::new(42));
map.insert("hello", "world");
std
(enabled by default) - Enables [HashMap
] and [HashSet
] helper types.
Benchmarks conducted on AMD Ryzen 7 5700G desktop.
![]() |
![]() |
For common 1-32 byte keys, MuseAir has a significant speed advantage (avg. 13.0 cycles/hash), even outperforming fxhash.
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.
The current MSRV (Minimum Supported Rust Version) is 1.83.0. MSRV changes are considered breaking changes.