| Crates.io | turbo-fnv |
| lib.rs | turbo-fnv |
| version | 0.1.0 |
| created_at | 2025-07-16 14:31:49.713919+00 |
| updated_at | 2025-07-16 14:31:49.713919+00 |
| description | A blazing fast drop-in replacement for fnv hash algorithm with batch processing optimizations |
| homepage | |
| repository | https://github.com/marcuspat/turbo-fnv |
| max_upload_size | |
| id | 1755568 |
| size | 969,711 |
A blazing fast drop-in replacement for the FNV hash algorithm with 2-9x performance improvements.
The original fnv crate processes data one byte at a time, leading to poor performance on modern CPUs. turbo-fnv delivers:
fnv (note: produces different hash values)Add to your Cargo.toml:
[dependencies]
turbo-fnv = "0.1"
Replace your fnv imports:
// Before:
// use fnv::{FnvHashMap, FnvHashSet};
// After:
use turbo_fnv::{FnvHashMap, FnvHashSet};
// The API is identical!
let mut map = FnvHashMap::default();
map.insert("hello", "world");
Benchmark results show significant performance improvements:
Performance gains come from:
Run cargo bench to measure actual performance on your system.
Migration is straightforward:
fnv = "1.0" with turbo-fnv = "0.1" in Cargo.tomluse fnv:: with use turbo_fnv::Note: Hash values will differ from original FNV. This is fine for HashMap/HashSet usage but may break code that depends on specific hash values.
See the Migration Guide for detailed instructions.
turbo-fnv/
├── src/ # Core implementation
├── tests/ # Comprehensive test suite
├── benches/ # Performance benchmarks
├── examples/ # Usage examples
├── docs/ # Additional documentation
└── analysis/ # Market research and analysis
turbo-fnv aims to improve performance through:
This project was created through comprehensive market analysis of the Rust ecosystem:
fnv (317M downloads, unmaintained for 62+ months)See Market Analysis Report for details.
Licensed under either of:
at your option.
Contributions are welcome! Please feel free to submit a Pull Request.
This project is a modern reimplementation of the FNV algorithm, originally created by Glenn Fowler, Landon Curt Noll, and Kiem-Phong Vo.