Benchmarks
Best-of-5, ns/op (lower is better), on linux-x64.
Request header parsing — contiguous
Single buffer, parsed in place, into a BinaryRequest.
| Payload | Glyph11 |
|---|---|
| ~95 B | 120 ns |
| 4 KB | 750 ns |
| 32 KB | 5251 ns |
Request header parsing — multi-segment
Fragmented request (3 segments) linearized into a buffer per request, then parsed.
| Payload | Glyph11 |
|---|---|
| ~95 B | 245 ns |
| 4 KB | 1258 ns |
| 32 KB | 8695 ns |
Chunked body decoding
Decoded size, through ChunkedBodyStream.
| Decoded | Glyph11 |
|---|---|
| 256 B | 19 ns |
| 4 KB | 115 ns |
| 32 KB | 826 ns |
Methodology
- Best-of-5 timed trials after warmup, on identical payloads, in one process.
- Full output: every parse builds a complete
BinaryRequest(path/query split, header list). - Multi-segment linearizes a fresh buffer per request (3 segments → one contiguous block), then parses — the cost of fragmentation.
The harness is in Benchmarks/.
Numbers vary run-to-run and by hardware; treat them as relative, not absolute.