Same WebSocket server, two RPC sessions, three workloads.
Each side connects to its own endpoint —
/capnwasm uses real Cap'n Proto wire format with
promise pipelining and microtask batching;
/capnweb uses capnweb's JSON-shaped wire.
The numbers below are what the browser actually pays.
echoU8 calls
Fire 200 RPC calls in the same tick, await all. capnwasm coalesces
them into one transport.send via microtask batching;
capnweb sends them individually. Per-call latency is what a real
burst-of-clicks workload pays.
| capnwasm | — | — |
|---|---|---|
| capnweb | — | — |
getChild() → echoU8() chainIssue both calls at once: the second targets the first's unresolved answer. capnwasm sends both Calls before any Return arrives (1 round-trip). capnweb does the same in JSON. Per-chain latency.
| capnwasm | — | — |
|---|---|---|
| capnweb | — | — |
echoBinary(64 KB) round-trip64 KB of raw bytes there and back. capnwasm ships them as binary on the wire; capnweb base64-encodes (+33% bytes both directions). The bytes column shows the cost.
| capnwasm | — | — |
|---|---|---|
| capnweb | — | — |