Skip to content

perf: inline option decoding - #8

Merged
cvik merged 1 commit into
mainfrom
perf/parser-inline
Oct 15, 2026
Merged

cvik merged 1 commit into
mainfrom
perf/parser-inline

Conversation

@cvik

@cvik cvik commented Oct 15, 2026

Copy link
Copy Markdown
Owner

Summary

Frontend-inline readVarLen without changing its checks, ownership, allocation policy or public API. LLVM already inlined the old helper, but Zig 0.16 could retain stack-materialized error results; explicit frontend inlining removes those merges.

Add exhaustive value/error/cursor coverage for all nibbles, extension words, short inputs and cursor prefixes. Keep version/release changes separate.

On the measured Zig 0.16/Zen 5 setup, isolated FBA parsing fell from ~34 to ~19 ns for the echo fixture and ~514 to ~140 ns for 32 options. Gains are workload/toolchain dependent, not a universal throughput claim.

Validation

60 tests pass in Debug and ReleaseSafe with Zig 0.15.1 and 0.16.0. The existing zig build bench -Doptimize=ReleaseFast command passes on the CI toolchain, Zig 0.15.1.

@cvik
cvik enabled auto-merge (squash) October 15, 2026 23:20
@cvik
cvik disabled auto-merge October 15, 2026 23:21
@cvik
cvik merged commit 1cac97e into main Oct 15, 2026
1 of 2 checks passed
@cvik
cvik deleted the perf/parser-inline branch October 15, 2026 23:21
@cvik cvik mentioned this pull request Oct 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant