cfallin opened PR #12613 from cfallin:bigger-valuedata to bytecodealliance:main:
This updates the
ValueDataPackedscheme from the old(enum tag) (CLIF type) (value 1) (value 2) /// | tag:2 | type:14 | x:24 | y:24 |encoding in a
u64to a new/// | tag:2 | type:14 | x:32 | y:32 |encoding, with a
packedtag attribute to ensure the struct fits in 10 bytes. This permits the full range ofValue(au32entity index) to be encoded, removing the remaining major limit on function body size after the work in #12611 to address #12229.Curiously, this appears to be a speedup in compile time of 3-5% on bz2 and 3% on spidermonkey-json (Sightglass, 50 data points each). My best guess as to why is that putting the value fields in their own
u32s allows for quick access without shifts/masks, which is actually better than the unaligned accesses (caused by 10-byte size) -- which have no penalty on modern mainstream CPUs -- and 25% size inflation of the value-definitions array.<!--
Please make sure you include the following information:
If this work has been discussed elsewhere, please include a link to that
conversation. If it was discussed in an issue, just mention "issue #...".Explain why this change is needed. If the details are in an issue already,
this can be brief.Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.htmlPlease ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->
cfallin requested fitzgen for a review on PR #12613.
cfallin requested wasmtime-compiler-reviewers for a review on PR #12613.
cfallin updated PR #12613.
github-actions[bot] added the label cranelift on PR #12613.
fitzgen submitted PR review.
fitzgen added PR #12613 Cranelift: update ValueDataPacked to support full Value range. to the merge queue
fitzgen merged PR #12613.
fitzgen removed PR #12613 Cranelift: update ValueDataPacked to support full Value range. from the merge queue
Last updated: Feb 24 2026 at 04:36 UTC