Crates.io | Xorfilter |
lib.rs | Xorfilter |
version | 0.2.2 |
source | src |
created_at | 2019-12-24 00:53:25.427824 |
updated_at | 2021-12-14 16:24:53.296498 |
description | No alloc membership approximation |
homepage | https://crates.io/crates/Xorfilter |
repository | |
max_upload_size | |
id | 191931 |
size | 62,006 |
A no_std
, no alloc crate for membership approximation.
const N: usize = 100000;
let mut keys = [0;N];
for i in 0..N {
keys[i] = i as u64;
}
let x = XorFilter::from(keys);
for i in 0..N {
x.contains(keys[i]);
}
No Docs
- Blocking on generic_const_exprs
No serialization
- Blocking on Serde
Other implementations need alloc
for Vec
.
Xor Filters are not designed to work with duplicate values. [1]
XorFilter
could benefit from some features in const generics that are not yet in nightly.
[1] Xor Filters: Faster and Smaller Than Bloom and Cuckoo Filters, Journal of Experimental Algorithmics.