Cersei

Benchmarks: Graph Memory

Grafeo graph database performance — store, recall, query, graph ON vs OFF.

Graph Memory Benchmarks

Grafeo embedded graph database. Apple Silicon, release build, memory_bench.rs.

Operations

OperationTimeNotes
Store single node30 usUUID + content + metadata
Store 100 nodes (bulk)8572 us (86 us/node)Amortized with WAL
Tag memory (topic)1241 usCreates/links Topic node
Link memories (edge)2681 usCreates RELATES_TO edge
Query by type3200 usFilter all Memory nodes
Query by topic77 usTraverse Topic-Memory edges
Recall (hit)98 usIndexed content lookup
Stats480 usCount nodes/edges

Benchmark dataset: 1503 memories, 123 topics, 152 relationships.

Graph ON vs OFF

Same operations on identical 100-file dataset:

OperationGraph OFFGraph ONDelta
Scan 100 files1310 us1308 us-0.2%
Recall (100 files)1359 us103 us-92.5%
Build context17 us16 us-6.4%

Graph recall is 92.5% faster than text-matching recall. The graph does indexed lookups on node content instead of scanning every file.

Scan and context building are unaffected — graph adds zero overhead to those paths.

Scaling

File CountScan (graph OFF)Recall (graph ON)
10141 us~10 us
1001212 us103 us
2002411 us~103 us
5006154 us~103 us

Text-matching recall scales linearly with file count. Graph recall is constant — it queries the index regardless of dataset size.

Run

cargo run --release -p abstract-cli --example memory_bench

On this page