CortexaDB LogoCortexaDB
Resources

Benchmarks

Performance benchmarks and methodology for v1.0.0

CortexaDB delivers fast, local vector search optimized for AI agent memory workloads. Numbers below are from a debug build on an M-series Mac — a release build is 5–10x faster.

Performance Overview

Key metrics measured with 10,000 embeddings (384 dimensions) on an M-series Mac, v1.0.0 debug build.

1.03ms p50 Search

HNSW search on 10,000 vectors. Release build achieves ~0.3ms p50.

952+ QPS

HNSW throughput (debug build). Release build exceeds 3,000 QPS.

95% Recall

Approximate search maintains high accuracy relative to brute-force.


Retrieval Benchmarks

Measured: 10,000 embeddings × 384 dimensions, 1,000 queries, 100 warmup, top-10.

Modep50p95p99ThroughputRecallDisk
HNSW1.03ms1.18ms1.29ms952 QPS95%47 MB
Exact16.38ms22.69ms35.77ms56 QPS100%31 MB

[!NOTE] These numbers are from a debug build (maturin develop). With a release build (maturin develop --release), HNSW achieves ~0.3ms p50 and 3,000+ QPS — consistent with the ingestion benchmarks below.


Ingestion

OperationTime
Bulk Ingest (1,000 chunks)0.12s
Single Memory Add1ms
HNSW Index Build (10,000 vectors)~286s (debug) / ~140s (release)

Methodology

  • Dataset: 10,000 random embeddings × 384 dimensions.
  • Environment: M-series Mac. Debug build via maturin develop.
  • Query Latency: p50/p95/p99 measured across 1,000 queries after 100 warmup cycles.
  • Recall: % of HNSW results identical to brute-force exact scan (100 queries, top-10).

Reproducing Results

Build the release extension for best performance:

cd crates/cortexadb-py
maturin develop --release
cd ../..
pip install numpy psutil

Run the automated benchmark suite:

# Generate 10k test vectors
python3 benchmark/generate_embeddings.py --count 10000 --dimensions 384

# Benchmark HNSW performance
python3 benchmark/run_benchmark.py --index-mode hnsw

# Benchmark Exact performance
python3 benchmark/run_benchmark.py --index-mode exact

Decision Guide

MetricUse ExactUse HNSW
Dataset Size< 10,000 entries> 10,000 entries
Recall Needed100% (Strict)95-99% (Semantic)
Latency Target< 20ms (debug) / < 2ms (release)< 5ms (debug) / < 1ms (release)
Resource ProfileMinimum MemoryHigh Performance

[!TIP] For datasets between 1k and 10k, Exact mode is often a good choice due to zero index-building overhead and 100% recall. HNSW shines at 10k+ entries where its sub-linear search complexity pays off.


Next Steps

On this page