Cersei

Benchmarks: Library

Cersei SDK tool dispatch and I/O performance.

Library Benchmarks

Cersei SDK in-process performance. Apple Silicon, release build, 50 iterations with warmup.

Tool Dispatch

ToolAvgMinMax
Edit0.02ms0.02ms0.04ms
Glob0.05ms0.05ms0.13ms
Write0.06ms0.05ms0.19ms
Read0.09ms0.08ms0.12ms
Grep6.04ms4.88ms6.82ms
Bash16.67ms16.39ms17.00ms

Grep latency is dominated by rg process spawn. Bash latency is shell execution. Everything else is pure in-process I/O.

Session I/O

OperationSpeed
Session write (single)27 us/entry
Session write (100 burst)26.5 us/entry
Session load (100 entries)268 us
Session load (1000 entries)2633 us

Write throughput: ~36000 entries/sec. Load scales linearly at ~2.6 us/entry.

Context Building

OperationSpeed
Full context (CLAUDE.md + MEMORY.md)45 us
Load MEMORY.md (200 lines)14.6 us

Auto-Dream Gates

OperationSpeed
should_consolidate()10 us
should_extract()sub-1 us
parse_extraction_output()0.7 us

Per-turn overhead for memory gates: under 12 microseconds.

Run

# Tool I/O
cargo run --example benchmark_io --release

# Memory + sessions
cargo run --example stress_memory --release

# Full standalone suite
cd examples/benchmark && cargo run --release

On this page