How splatlab/adaptiveqf works
Main Components
a. Core AQF Library:
• Main API and implementation. This includes components found in the “include” (headers defining public APIs such as gqf.h, gqf_file.h, etc.) and “src” directories (source files like gqf.c, hash_table.c, partitioned_counter.c, etc.).
• The API functions (qf_malloc, qf_insert_ret, qf_query, qf_remove, qf_adapt, etc.) serve as the entry points to this library.
b. Alternate/ Experimental Filter Implementations:
• These are found under “other_filters” and include variants such as “acf” (Adaptive Cuckoo Filter?), “acfsim”, “cf” (likely Cuckoo Filter variant), “cqf”, and “taf”.
• Each variant typically has its own benchmarks, examples, and sometimes different source implementations. Their subdirectories (src, example, benchmarks) demonstrate both their similarities and differences from the core AQF algorithm.
c. Testing and Benchmarking Components:
• The “test” directory and various “test_*.c” or “test_*.cc” files under “src” and “other_filters” are designed to validate functionality, check performance (e.g., micro, throughput, adversarial cases), and provide integration examples (including the reverse map usage with SplinterDB as shown in the README).
d. External Dependencies and Hardware Considerations:
• The README mentions the dependency on the SSL library (libssl) and the support for different CPU instruction sets (using Haswell instructions or a fallback for older CPUs).
Architectural Patterns and Design Principles
• The project is modular: the separation between public header APIs, core implementation (source), and alternative implementations (other_filters) implies a design that favors separation of concerns.