linux-x64 · ns/op

Benchmarks

Best-of-5, ns/op (lower is better), on linux-x64.

Request header parsing — contiguous

Single buffer, parsed in place, into a BinaryRequest.

PayloadGlyph11
~95 B120 ns
4 KB750 ns
32 KB5251 ns

Request header parsing — multi-segment

Fragmented request (3 segments) linearized into a buffer per request, then parsed.

PayloadGlyph11
~95 B245 ns
4 KB1258 ns
32 KB8695 ns

Chunked body decoding

Decoded size, through ChunkedBodyStream.

DecodedGlyph11
256 B19 ns
4 KB115 ns
32 KB826 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.