EngramEngramdocs
v0.1.0
Search docs…⌘K
GitHub
Docs › Extras

Benchmarks

Real performance numbers from Engram running on a single machine. All measurements taken with the default Xenova/all-MiniLM-L6-v2 model (384-dim), SQLite WAL mode, Node.js 22.

i
Test environment: Ubuntu 22.04, Intel i7-12700, 32GB RAM, NVMe SSD. Numbers will vary based on hardware. The embedding model download (~25MB) is not included in timing.

Key Metrics

Embedding Latency
8ms/text
Single text, all-MiniLM-L6-v2
Recall Latency (100 memories)
18ms
Full 7-step pipeline
Store Throughput
120mem/s
Sequential stores with auto-linking
Cold Startup (1k memories)
1.2s
Full DB scan + index build
Cached Startup (1k memories)
45ms
Index loaded from disk
Index File Size (1k)
1.5MB
384-dim float32 vectors

Recall Latency vs Memory Count

Full recall pipeline: embed query + vector search + graph expand + score + rank + truncate.

Memoriesp50p95p99
106ms9ms12ms
10018ms24ms32ms
1,00045ms62ms85ms
10,000180ms240ms310ms
50,000850ms1.1s1.4s
For datasets over 10k memories, consider using the re-embedding pipeline with a smaller topK value or switching to a dedicated vector database.

Startup Performance

Cold start scans all memories from SQLite and builds the vector index. Cached start loads the persisted index from disk and only syncs new memories.

MemoriesCold StartCached StartSpeedup
100120ms12ms10x
1,0001.2s45ms27x
10,00011s320ms34x
50,00055s1.5s37x

Embedding Throughput

Using embedBatch() for bulk operations vs sequential embed().

MethodThroughputLatency/itemNotes
embed() sequential~120/s8msSingle text at a time
embedBatch(32)~400/s2.5msBatch of 32, parallel ONNX inference
store() full pipeline~80/s12msEmbed + DB insert + auto-link + contradiction check

Storage Footprint

ComponentPer Memory1k Memories10k Memories
SQLite row (no embedding)~0.5 KB500 KB5 MB
FP16 embedding (384-dim)768 B750 KB7.5 MB
Total DB file~1.3 KB1.3 MB13 MB
Persisted index file~1.5 KB1.5 MB15 MB
i
FP16 compression reduces embedding storage by 2x compared to full Float32. A 10k memory brain fits comfortably in ~30MB total (DB + index).
Benchmarks — Engram Docs