fitzgen opened PR #14887 from fitzgen:heap-index-inline-always to bytecodealliance:main:
Even though they are generic and marked
#[inline]they aren't always getting inlined when you would expect them to be, but it is critical for collector performance that they are inlined. It turns out that enabling LTO isn't even good enough to inline them reliably, we were really just getting lucky with the exact codegen unit slicing we landed on for a while that they were being inlined at all.So instead, just mark them as
inline(always).Fixes https://github.com/bytecodealliance/are-we-fast-yet/issues/7
<!--
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 review the Bytecode Alliance's AI tool usage policy at
https://github.com/bytecodealliance/governance/blob/main/AI_TOOL_POLICY.mdPlease ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->
fitzgen removed the review request for wasmtime-core-reviewers from PR #14887.
fitzgen requested wasmtime-core-reviewers for a review on PR #14887.
fitzgen requested pchickey for a review on PR #14887.
:thumbs_up: alexcrichton submitted PR review.
alexcrichton added PR #14887 Mark GcHeap::index[_mut] methods as inline(always) to the merge queue
fitzgen updated PR #14887.
:check: alexcrichton merged PR #14887.
alexcrichton removed PR #14887 Mark GcHeap::index[_mut] methods as inline(always) from the merge queue
fitzgen commented on PR #14887:
This fixed the issue, and you can see that in this graph: https://bytecodealliance.github.io/are-we-fast-yet/?metric=instructions-retired&rel=1
Last updated: Oct 31 2026 at 23:03 UTC