linux-x64 · ns/op

Benchmarks

Best-of-5, ns/op (lower is better), on linux-x64. The native packages are the AVX2 / SSE4.2 builds. Green is the fastest per row. All three reject malformed framing; they differ in how much they validate — see the trade-off.

Request header parsing — contiguous

Single buffer, parsed in place. → BinaryRequest for Glyph11 / Pico; raw field spans for Native.

PayloadGlyph11Glyph11.NativeGlyph11.Pico
~95 B120 ns99 ns80 ns
4 KB750 ns502 ns487 ns
32 KB5251 ns3752 ns3370 ns

Request header parsing — multi-segment

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

PayloadGlyph11Glyph11.NativeGlyph11.Pico
~95 B245 ns116 ns118 ns
4 KB1258 ns721 ns674 ns
32 KB8695 ns4969 ns4627 ns

Both native packages are ~2× the managed parser on fragmented input; Pico leads on large, Native on tiny.

Chunked body decoding

Decoded size. Glyph11.Pico reuses Glyph11's ChunkedBodyStream, so they share a column.

DecodedGlyph11 / PicoGlyph11.Native
256 B19 ns21 ns
4 KB115 ns70 ns
32 KB826 ns808 ns

Methodology

  • Best-of-5 timed trials after warmup, on identical payloads, in one process.
  • Native builds: libglyph11 at -march=x86-64-v3 (AVX2); libglyph11pico with picohttpparser's SSE4.2 path.
  • Same output where comparable: Glyph11 and Pico both build a full BinaryRequest (path/query split, header list); Native fills raw (offset,length) spans.
  • Multi-segment linearizes a fresh buffer per request (3 segments → one contiguous block), then parses — the cost of fragmentation.

The harnesses are in bench/. Numbers vary run-to-run and by hardware; treat them as relative, not absolute.