Stream: git-wasmtime

Topic: wasmtime / PR #15217 Skip clearing and restoring the may-...


view this post on Zulip Wasmtime GitHub notifications bot (Nov 10 2026 at 16:27):

fitzgen opened PR #15217 from fitzgen:no-may-leave-flag-clear-and-restore to bytecodealliance:main:

When we don't call the CABI realloc function, we don't re-enter the component, so nothing will ever check the may-leave flag, and therefore we can avoid clearing and restoring it. This avoids two stores on the sync adapter hot path.

execution :: instructions-retired :: cm-online-stats

    no-may-leave is 1.08104x to 1.08105x faster than main!
    (confidence = 99%, p < 0.0001)

    ┌───────────┬───────────┬──────────────┬──────────────┬────────┬──────────────┐
    │ Min       │ Max       │ Mean         │ Median       │ Noise  │ Engine       │
    ├───────────┼───────────┼──────────────┼──────────────┼────────┼──────────────┤
    │ 268911085 │ 269011566 │ 268915852.60 │ 268912332.00 │ 0.002% │ main         │
    ├───────────┼───────────┼──────────────┼──────────────┼────────┼──────────────┤
    │ 248751014 │ 248799066 │ 248755334.49 │ 248752858.00 │ 0.002% │ no-may-leave │
    └───────────┴───────────┴──────────────┴──────────────┴────────┴──────────────┘

compilation :: instructions-retired :: cm-online-stats

    no-may-leave is 1.02x to 1.04x faster than main!
    (confidence = 99%, p < 0.0001)

    ┌──────────┬──────────┬─────────────┬─────────────┬────────┬──────────────┐
    │ Min      │ Max      │ Mean        │ Median      │ Noise  │ Engine       │
    ├──────────┼──────────┼─────────────┼─────────────┼────────┼──────────────┤
    │ 78784658 │ 91356684 │ 85923816.05 │ 85989516.50 │ 4.052% │ main         │
    ├──────────┼──────────┼─────────────┼─────────────┼────────┼──────────────┤
    │ 77217077 │ 88273017 │ 83327406.36 │ 83447416.50 │ 3.453% │ no-may-leave │
    └──────────┴──────────┴─────────────┴─────────────┴────────┴──────────────┘

execution :: cycles :: cm-online-stats

    no-may-leave is 1.0208x to 1.0214x faster than main!
    (confidence = 99%, p < 0.0001)

    ┌──────────┬──────────┬─────────────┬─────────────┬────────┬──────────────┐
    │ Min      │ Max      │ Mean        │ Median      │ Noise  │ Engine       │
    ├──────────┼──────────┼─────────────┼─────────────┼────────┼──────────────┤
    │ 58105236 │ 59082055 │ 58490214.06 │ 58495591.50 │ 0.069% │ main         │
    ├──────────┼──────────┼─────────────┼─────────────┼────────┼──────────────┤
    │ 57111397 │ 57656304 │ 57288072.59 │ 57279622.00 │ 0.087% │ no-may-leave │
    └──────────┴──────────┴─────────────┴─────────────┴────────┴──────────────┘

compilation :: cycles :: cm-online-stats

    No difference in performance.

    ┌──────────┬───────────┬─────────────┬─────────────┬─────────┬──────────────┐
    │ Min      │ Max       │ Mean        │ Median      │ Noise   │ Engine       │
    ├──────────┼───────────┼─────────────┼─────────────┼─────────┼──────────────┤
    │ 36005967 │ 111132623 │ 76590245.92 │ 78995590.50 │ 22.783% │ main         │
    ├──────────┼───────────┼─────────────┼─────────────┼─────────┼──────────────┤
    │ 47486874 │ 119571545 │ 80945587.13 │ 84024912.50 │ 32.787% │ no-may-leave │
    └──────────┴───────────┴─────────────┴─────────────┴─────────┴──────────────┘

<!--
Please make sure you include the following information:

Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.html

Please review the Bytecode Alliance's AI tool usage policy at
https://github.com/bytecodealliance/governance/blob/main/AI_TOOL_POLICY.md

Please ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->

view this post on Zulip Wasmtime GitHub notifications bot (Nov 10 2026 at 16:27):

fitzgen removed the review request for wasmtime-core-reviewers from PR #15217.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 10 2026 at 16:27):

fitzgen requested alexcrichton for a review on PR #15217.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 10 2026 at 16:27):

fitzgen requested wasmtime-core-reviewers for a review on PR #15217.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 10 2026 at 16:46):

:thumbs_up: alexcrichton submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 10 2026 at 16:47):

alexcrichton added PR #15217 Skip clearing and restoring the may-leave flag when we don't call realloc to the merge queue.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 10 2026 at 17:09):

:check: alexcrichton merged PR #15217.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 10 2026 at 17:09):

alexcrichton removed PR #15217 Skip clearing and restoring the may-leave flag when we don't call realloc from the merge queue.


Last updated: Nov 19 2026 at 20:05 UTC