Benchmark Analysis #1
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Benchmark Analysis
This analysis examines Mappy's benchmarking infrastructure and empirical performance data.
Benchmark Setup
Mappy uses Criterion.rs for benchmarking. The benchmark suite includes:
Empirical Data
Insert Performance
Insert performance scales linearly with dataset size. Throughput decreases at larger sizes due to cache effects and collision handling.
Query Performance
Query performance is faster than insert operations (2-3x). Throughput degradation at 100k items suggests cache pressure.
Delete Performance
Delete operations are slowest, requiring tombstone management and run reconstruction.
Hash Function Comparison
Fnv performs best in this benchmark, though AHash is recommended for general use.
Slot Finding Performance
Slot finding is fast, benefiting from the quotient filter structure.
Multiset Operations
Multiset operations show stable throughput across sizes.
Memory Usage
Memory allocation time scales sub-linearly.
Mathematical Analysis
Space Complexity
Where:
n= number of items\varepsilon= false-positive ratev= value size in bitsTime Complexity
Insert:
T_{insert}(n) = O(1)average case,O(\log n)worst caseQuery:
T_{query}(n) = O(1)average case, with\Pr[\text{false positive}] \leq \varepsilonDelete:
T_{delete}(n) = O(1 + \alpha)where\alphais fraction of deleted entriesBenchmarking Practices
Based on Rust API Guidelines and Criterion.rs documentation:
Assessment
Strengths:
Areas for Improvement:
Recommendations
Immediate
Long-term
References