| Crates.io | hyperlog_simd |
| lib.rs | hyperlog_simd |
| version | 0.2.0 |
| created_at | 2023-09-18 02:33:54.475903+00 |
| updated_at | 2023-09-21 17:56:33.607739+00 |
| description | A SIMD optimized implementation of the HLL and HLL++ algorithms |
| homepage | |
| repository | https://github.com/bcmcmill/hyperlog-simd |
| max_upload_size | |
| id | 975472 |
| size | 60,901 |
hyperlog-simdA Rust implementation of HyperLogLog and HyperLogLogPlusPlus streaming distinct count algorithms with SIMD (Single Instruction, Multiple Data) support on both ARM and x86_64 platforms. Also features serde compatibility for easy serialization and deserialization.
Add hyperlog-simd to your Cargo.toml dependencies:
[dependencies]
hyperlog-simd = "0.1.0"
Here's a simple example to get started:
use hyperlog_simd::{HyperLogLog, HyperLogLogPlusPlus};
let mut hll = HyperLogLog::new();
hll.add("hello");
hll.add("world");
let count = hll.estimate();
println!("Estimated distinct count: {}", count);
let mut hllpp = HyperLogLogPlusPlus::new();
hllpp.add("hello");
hllpp.add("world");
let count_pp = hllpp.estimate();
println!("Estimated distinct estimate (HLL++): {}", count_pp);
For detailed examples and documentation, please refer to the documentation.
This library provides impressive performance gains on platforms that support SIMD. Benchmarks will be updated periodically, and you can also run them yourself using:
cargo bench
We welcome contributions! Please see CONTRIBUTING.md for guidelines and details.
hyperlog-simd is licensed under the MIT License. See LICENSE for details.
Happy coding! We hope hyperlog-simd helps in your streaming distinct count needs with maximum efficiency! 🚀🦀