Benchmarks
Reproduce (about 35 s): cd mvp && cargo build --release --bin pqbench && ./target/release/pqbench --iters 1000 --warmup 100 --rounds 5 --bulk-mib 512.
Handshake latency (p50 / p99 ms, 5 x 1000 handshakes)
Section titled “Handshake latency (p50 / p99 ms, 5 x 1000 handshakes)”| Transport | Key exchange | p50 | p99 |
|---|---|---|---|
| TCP | classical X25519 | 0.369 | 0.416 |
| TCP | hybrid X25519MLKEM768 | 0.399 | 0.442 |
| TCP | MLKEM1024 (P-384 cert) | 0.378 | 0.432 |
| QUIC | classical X25519 | 0.419 | 0.494 |
| QUIC | hybrid X25519MLKEM768 | 0.460 | 0.534 |
| QUIC | MLKEM1024 (P-384 cert) | 0.464 | 0.509 |
Bytes on the wire for one full handshake
Section titled “Bytes on the wire for one full handshake”| Transport | Key exchange | Total bytes | vs classical |
|---|---|---|---|
| TCP | classical | 1628 | +0 |
| TCP | hybrid | 3900 | +2272 |
| TCP | MLKEM1024 | 4700 | +3072 |
| TCP | cnsa2 as shipped (MLKEM1024 + ML-DSA-87 leaf) | 11681 | +10053 |
| QUIC | hybrid | 7728 | +2337 vs 5391 |
Reading it: hybrid costs about 30 to 40 microseconds and 2.3 KB per full handshake on loopback. After the handshake the record layer is the same AES-256-GCM, so bulk throughput does not depend on the key exchange (TCP medians 4653 to 4876 MiB/s, within about 5%).
Relay added latency (1 visitor, 1 KiB response, same handler direct vs via relay)
Section titled “Relay added latency (1 visitor, 1 KiB response, same handler direct vs via relay)”| Relay | Shops | Added p50 | Added p99 |
|---|---|---|---|
| Rust unicomm relay | 100 | +60 us | +74 us |
| Rust unicomm relay | 1000 | +64 us | +87 us |
| Rust unicomm relay | 10000 | +66 us | +145 us |
| Go reference relay | 1000 | +87 us | +266 us |
Under open-loop load the tails are dominated by scheduler and GC noise on the shared machine, so the tail rows in the source file are marked noise where
they are not meaningful. The relay’s Rust memory figures are macOS ps RSS, and the older docs/relay-bench.md memory rows predate a codec fix.