Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Performance

Benchmarks

Every published headline number — retrieval quality, poisoning resistance, audit tamper-evidence — with its exact reproduction command and raw-results file lives in one place: the benchmark index. Start there; each row also says what the number does not show.

Mnemo includes Criterion benchmarks in benches/engine_bench.rs:

cargo bench -p mnemo-core

Retrieval Strategies

StrategySpeedQualityBest For
exactFastestFilter-onlyKnown queries, tag-based
bm25FastGood for keywordsKeyword search
vectorMediumBest semanticSemantic similarity
graphMediumGood for relatedConnected memories
hybridSlowestBest overallGeneral use (default)

Storage Backend Comparison

MetricDuckDBPostgreSQL
Latency (single op)~1ms~5ms
ThroughputHigh (local)High (concurrent)
Memory usageLowMedium
SetupZero-configRequires server

Optimization Tips

  1. Use noop embeddings during development (faster, no API calls)
  2. Set appropriate limits in recall to avoid over-fetching
  3. Use tags and filters to narrow search space before semantic search
  4. Use exact strategy when you know the filtering criteria
  5. Run decay passes periodically to clean up low-importance memories