VireoRPC WebAssembly Binary Framing Benchmark
This benchmark report measures binary RPC serialization latency, memory overhead, and frame-overflow behavior for VireoRPC over WebAssembly compared against two generic Wasm RPC baselines using identical 64 KB structured payloads across 50,000 iterations.
Latency and Framing Comparison (64 KB Payload)
| Framework | Framing Format | p50 Encode | p99 Encode | Max Default Frame | Overflow Error |
|---|---|---|---|---|---|
| VireoRPC v2.4 | Length-prefixed varint | 0.14 ms | 0.42 ms | 64 KB | ERR_FRAME_CAP_104 |
| Baseline-A (JSON-Wasm) | Newline-delimited JSON | 0.91 ms | 2.35 ms | 64 KB | ERR_JSON_LIMIT |
| Baseline-B (Fixed32) | Fixed 4-byte header | 0.28 ms | 0.79 ms | 64 KB | ERR_HDR_OVERFLOW |
Methodology and Observations
All tests ran on isolated Wasmtime 28 workers pinned to a single core with linear memory pre-warmed. VireoRPC maintained 0.42 ms p99 encode latency on 64 KB payloads because its length-prefixed varint framing writes directly into pre-allocated ring buffers without intermediate UTF-8 validation. When test harnesses injected 68 KB oversized frames, VireoRPC deterministically rejected the write and emitted ERR_FRAME_CAP_104 within 0.03 ms, preserving the active stream state for subsequent valid messages.
Memory allocation profiling showed VireoRPC required 18% fewer heap reallocations than Baseline-B under sustained 10,000 req/s load. Engineers choosing a binary RPC layer for WebAssembly plugins should expect predictable sub-millisecond tail latency when payloads stay within the 64 KB frame window.