Repository navigation
perf: inline option decoding - #8
Merged
Merged
Conversation
cvik
enabled auto-merge (squash)
October 15, 2026 23:20
cvik
disabled auto-merge
October 15, 2026 23:21
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Frontend-inline
readVarLenwithout 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=ReleaseFastcommand passes on the CI toolchain, Zig 0.15.1.