Precompute bytecode operand sizes - #81
Merged
Merged
Conversation
chicoxyzzy
marked this pull request as ready for review
July 29, 2026 23:50
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.
What changed
Op.spec()schema.Op.operandSize()as one indexed load instead of re-running instruction metadata and operand-layout classification at runtime.Why
ReleaseFast profiles attributed roughly 31% of Richards, 19% of DeltaBlue, and 22% of RayTrace samples to runtime operand-size metadata. Merged opcode-family handlers call this path on every execution even though the bytecode schema is immutable.
Impact
The serialized remote 12-pair A/B improved all six interpreter macros: Richards 0.582x, DeltaBlue 0.725x, Crypto 0.681x, RayTrace 0.748x, Navier-Stokes 0.765x, and Splay 0.849x, for a 0.720x geometric mean. The default production-tier geometric mean was 0.706x. Interpreter
prop_accessmeasured 0.576x, and the full micro suite reported no regression past the paired-run threshold. Dispatch counts and bytecode encoding are unchanged.Validation
zig build test-fastOp:schema/table equality tests