Benchmarks
All benchmarks use criterion and run on localhost. Run with cargo bench -p nhttp3-quic.
HTTP/3 vs HTTP/2
| Metric | HTTP/3 (nhttp3) | HTTP/2 |
| TLS Handshake | 154 µs | 166 µs |
| Network Handshake | 1-RTT | 2-RTT |
| Header Compression | QPACK (50% savings) | HPACK |
| HOL Blocking | None | Yes (shared TCP) |
Codec Performance
| Operation | Time | Throughput |
| VarInt encode | 20 ns | — |
| STREAM frame encode (1200B) | 64 ns | 18.7 GB/s |
| STREAM frame parse (1200B) | 73 ns | 16.4 GB/s |
| QPACK encode (6 headers) | 680 ns | — |
| QPACK decode (6 headers) | 490 ns | — |
| Transport params encode | ~80 ns | — |