Skip to content

Performance Data

Measured latency, throughput, and resource consumption across AgentCTX components.

OperationTypeScriptRust NativeWASM
Parse (simple)0.08ms0.004ms0.01ms
Parse (complex, filters + payload)0.15ms0.008ms0.02ms
Parse (hybrid mode)0.25ms0.012ms0.03ms
ParseMulti (10 statements)0.90ms0.04ms0.10ms
TargetTypeScriptRust NativeSpeedup
human0.8ms0.008ms100x
surrealql0.5ms0.005ms100x
mcp-jsonrpc0.3ms0.003ms100x
Batch (10 stmts, human)5.2ms0.05ms104x

End-to-end latency through the 15-stage middleware pipeline:

Operationp50p95p99
?t (tool search)2ms5ms12ms
>t (tool call)15ms45ms120ms
?k (knowledge search)8ms25ms50ms
+m (memory store)3ms8ms15ms
?m (memory search)5ms15ms30ms
?i (inspection)1ms2ms5ms

Tool call latency is dominated by the backend MCP server, not the gateway.

OperationThroughputLatency
Encode (Rust)2.1M ops/sec0.47μs
Decode (Rust)2.4M ops/sec0.42μs
Encode (TypeScript)480K ops/sec2.1μs
Decode (TypeScript)520K ops/sec1.9μs
ComponentRSS (idle)RSS (active)
Gateway (TypeScript)45MB80–120MB
Gateway (Rust)8MB15–30MB
SurrealDB50MB100MB–1GB
NATS15MB30–60MB
Query TypeRecordsp50p95
Memory lookup by ID10.3ms0.8ms
Memory search (HNSW, k=5)10K2ms5ms
Memory search (HNSW, k=5)100K4ms10ms
Knowledge search (HNSW, k=3)50K chunks3ms8ms
LIVE SELECT subscription0.5ms1.5ms

All measurements taken on:

  • CPU: AMD Ryzen 9 7950X (16C/32T)
  • RAM: 64GB DDR5
  • Storage: NVMe SSD
  • OS: Ubuntu 22.04 / Windows 11
  • Node.js: v22.x
  • Rust: 1.82+