Crates.io | fusefilter |
lib.rs | fusefilter |
version | 0.1.0 |
source | src |
created_at | 2021-08-04 03:56:01.394074 |
updated_at | 2021-08-17 01:26:41.597844 |
description | No alloc membership approximation |
homepage | |
repository | https://crates.io/crates/fusefilter |
max_upload_size | |
id | 431334 |
size | 56,734 |
const N: usize = 1000000;
let mut keys = [0; N];
for i in 0..N {
keys[i] = i as u64;
}
let f: Fuse<u8, { N }> = Fuse::try_from(&keys);
for i in 0..10 {
f.contains(&keys[i]);
}
Fuse Filters are not designed to work with duplicate values. [1]
Fusefilters could benefit from some features in const generics that are not yet in nightly. We did not want to wait for const generic fuse filters, so that is the reason behind why there are some const fn
s and Sized
.
The design here comes from Xorf.
[1] https://arxiv.org/pdf/1907.04749.pdf, 27th Annual European Symposium on Algorithms.