Performance - UnitBuilds-CC/V.E.L.O.C.I.T.Y.-MCP GitHub Wiki
Performance
Benchmarks
Run the built-in benchmark suite:
./target/release/velocity_mcp --benchmark
Protocol Parsing
Same tool call, full field extraction (apples-to-apples):
| Operation | Mean Latency | Throughput |
|---|---|---|
| JSON-RPC parse + extract | 722.6 ns | ~1.38M req/s |
| NDA-native parse + Merkle + extract | 459.1 ns | ~2.18M req/s |
| NDA speedup | 1.6x |
Shared Memory Throughput
| Operation | Mean Latency | Throughput |
|---|---|---|
| JSON-in-shmem R/W | 38.8 ns | 25.8M ops/s |
| NDA-native shmem R/W | 12.6 ns | 79.2M ops/s |
| NDA speedup | 3.1x |
Concurrent Scaling
| Threads | Throughput |
|---|---|
| 1 | 2.86M req/s |
| 4 | 7.01M req/s |
| 8 | 12.7M req/s |
vs Node.js MCP
Stdio, 200 requests per method (Intel Core i5-14400F):
| Method | Node.js | VELOCITY-MCP | Speedup |
|---|---|---|---|
| ping | 0.573 ms | 0.157 ms | 3.6x |
| tools/list | 1.050 ms | 0.154 ms | 6.8x |
| tools/call | 0.546 ms | 0.136 ms | 4.0x |
| Overall | 0.627 ms | 0.164 ms | 3.8x |
Resource Usage
| Metric | VELOCITY-MCP | Node.js MCP |
|---|---|---|
| Memory | ~15 MB | ~120 MB |
| Startup | <50ms | ~500ms |
Criterion Benchmarks
For detailed statistical analysis:
cargo bench # All benchmarks
cargo bench --bench protocol_bench # Protocol only
cargo bench -- --html # With HTML report
See also: Transport-Modes, NDA-Format