You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Contention: Under high contention, performance actually improves at 8
threads vs 4 (lock sharding distributes load)
Parallel scans: Uses rayon for >1000 keys (25-53% faster)
scan_count vs scan: Count-only is ~5x faster (avoids string cloning)
Bloom Filter (optional)
Operation
Time
add
68 ns
might_contain (hit)
46 ns
might_contain (miss)
63 ns
Sparse Lookups (1K keys in store)
Query Type
Without Bloom
With Bloom
Negative lookup
52 ns
68 ns
Positive lookup
45 ns
60 ns
Sparse workload (90% miss)
52 ns
67 ns
Note: Bloom filter adds ~15ns overhead for in-memory DashMap stores. It's
designed for scenarios where the backing store is slower (disk, network, remote
database), where the early rejection of non-existent keys avoids expensive I/O.
Snapshot Persistence (bincode)
Operation
100 items
1,000 items
10,000 items
save
100 us (1.0M/s)
927 us (1.08M/s)
12.6 ms (791K/s)
load
74 us (1.35M/s)
826 us (1.21M/s)
10.7 ms (936K/s)
load_with_bloom
81 us (1.23M/s)
840 us (1.19M/s)
11.0 ms (908K/s)
Each item is a TensorData with 3 fields: id (i64), name (String), embedding
(128-dim Vec<f32>).
Snapshot File Sizes
Items
File Size
Per Item
100
~60 KB
~600 bytes
1,000
~600 KB
~600 bytes
10,000
~6 MB
~600 bytes
Snapshot Analysis
Throughput: ~1M items/second for both save and load
Atomicity: Uses temp file + rename for crash-safe writes
Bloom filter overhead: ~3-5% slower to rebuild filter during load
Scaling: Near-linear with dataset size
File size: ~600 bytes per item with 128-dim embeddings (dominated by
vector data)
Write-Ahead Log (WAL)
WAL provides crash-consistent durability with minimal performance overhead.
Benchmarks use same payload as in-memory tests (128-dim embeddings).
WAL Writes
Records
Time
Throughput
100
152 us
657K ops/s
1,000
753 us
1.33M ops/s
10,000
6.95 ms
1.44M ops/s
WAL Recovery
Records
Time
Throughput
100
382 us
261K elem/s
1,000
394 us
2.5M elem/s
10,000
391 us
25.6M elem/s
WAL Analysis
Near constant recovery time: Recovery is dominated by file open overhead
(~400us), not record count