| Crates.io | range-filters |
| lib.rs | range-filters |
| version | 0.1.0 |
| created_at | 2025-12-03 06:07:35.399603+00 |
| updated_at | 2025-12-03 06:07:35.399603+00 |
| description | High-performance range filter implementation - DIVA (VLDB 2025 Best Research Paper) |
| homepage | |
| repository | https://github.com/JP-Reddy/range-filters |
| max_upload_size | |
| id | 1963431 |
| size | 194,938 |
High-performance dynamic range filter implementation in Rust, featuring DIVA - a state-of-the-art range filter that won the VLDB 2025 Best Research Paper Award.
DIVA is a novel range filter data structure designed for efficient range queries on sorted data. Unlike traditional Bloom filters that are efficient only for point queries, DIVA provides native support for range queries while maintaining low memory overhead and high query performance.
Key features:
Add this to your Cargo.toml:
[dependencies]
range-filters = "0.1.0"
use range_filters::Diva;
// Create a DIVA filter from sorted keys
let keys = vec![100, 200, 300, 400, 500, 600, 700, 800, 900, 1000];
let target_size = 1024; // Sample every 1024 keys
let fpr = 0.01; // 1% false positive rate
let diva = Diva::new_with_keys(&keys, target_size, fpr);
// Check if any key exists in the range [200, 600]
if diva.range_query(200, 600) {
println!("At least one key exists in range [200, 600]");
}
let mut diva = Diva::new_with_keys(&keys, 1024, 0.01);
// Insert a new key
diva.insert(550);
// Verify insertion
assert!(diva.contains(550));
The repository includes benchmarks comparing DIVA with Bloom filters. We compare it with fast-bloom implementation of Bloom Filter.
cargo bench
# Run only DIVA benchmarks
cargo bench diva
# Run only range query benchmarks
cargo bench range_query
# Run construction benchmarks
cargo bench construction
# Run point query benchmarks
cargo bench point_query
DIVA significantly outperforms traditional Bloom filters for range queries:


DIVA combines several data structures for optimal performance:
This project is licensed under the MIT License.
Contributions are welcome! Please feel free to submit issues or pull requests.