fitzgen opened PR #12974 from fitzgen:drc-runtime-improvements to bytecodealliance:main:
Depends on https://github.com/bytecodealliance/wasmtime/pull/12969
See each commit message for details.
More coming soon after this.
fitzgen requested alexcrichton for a review on PR #12974.
fitzgen requested wasmtime-compiler-reviewers for a review on PR #12974.
fitzgen requested wasmtime-core-reviewers for a review on PR #12974.
fitzgen updated PR #12974.
github-actions[bot] added the label wasmtime:ref-types on PR #12974.
github-actions[bot] added the label wasmtime:api on PR #12974.
github-actions[bot] commented on PR #12974:
Subscribe to Label Action
cc @fitzgen
<details>
This issue or pull request has been labeled: "wasmtime:api", "wasmtime:ref-types"Thus the following users have been cc'd because of the following labels:
- fitzgen: wasmtime:ref-types
To subscribe or unsubscribe from this label, edit the <code>.github/subscribe-to-label.json</code> configuration file.
Learn more.
</details>
alexcrichton submitted PR review:
I need to spend more time looking at Combine dec_ref, trace, and dealloc into single-pass loop but this is one thing I noticed. The later commits seem fine though.
This is another case though where in-wasm GC allocation, GC mark/sweep, etc, would I suspect remove a huge amount of the overhead since the host has to dance around "the heap could be corrupt at any time" which loses a lot of perf I believe. I realize that's a big undertaking, but we may want to discuss more seriously in a meeting at some point if it's table stakes or not for shipping gc.
alexcrichton created PR review comment:
This seems like it's a bit of a poor-man's hash map here. Since this is already using a hash map, what's the performance of using a custom hasher where the hash of
VMSharedTypeIndexis just its bit value?
fitzgen commented on PR #12974:
I realize that's a big undertaking, but we may want to discuss more seriously in a meeting at some point if it's table stakes or not for shipping gc.
Happy to discuss at a meeting, I'll add an item, but I find it super surprising that we would even entertain the idea of blocking enabling the GC proposal by default on self-hosting the free list (or even worse from a time-to-shipping perspective: self-hosting the whole collector runtime).
alexcrichton submitted PR review:
@fitzgen @cfallin and I talked a bit more about GC things today, and we'll summarize our thinking at tomorrow's Wasmtime meeting as well.
fitzgen submitted PR review.
fitzgen created PR review comment:
Good call. I reverted that commit and things got ~10% slower, but then I added a custom nop-hasher and they got ~3% faster from where we started. So seems like the nop-hasher is the way to go! Will push momentarily.
fitzgen updated PR #12974.
fitzgen has enabled auto merge for PR #12974.
fitzgen added PR #12974 A handful of optimizations for the DRC collector to the merge queue.
github-merge-queue[bot] removed PR #12974 A handful of optimizations for the DRC collector from the merge queue.
fitzgen updated PR #12974.
fitzgen has enabled auto merge for PR #12974.
fitzgen added PR #12974 A handful of optimizations for the DRC collector to the merge queue.
github-merge-queue[bot] removed PR #12974 A handful of optimizations for the DRC collector from the merge queue.
fitzgen has enabled auto merge for PR #12974.
fitzgen updated PR #12974.
fitzgen added PR #12974 A handful of optimizations for the DRC collector to the merge queue.
alexcrichton commented on PR #12974:
I pulled this out of the queue manually due to the failure at https://github.com/bytecodealliance/wasmtime/actions/runs/24208166925/job/70669519553
alexcrichton removed PR #12974 A handful of optimizations for the DRC collector from the merge queue.
fitzgen updated PR #12974.
fitzgen has enabled auto merge for PR #12974.
fitzgen added PR #12974 A handful of optimizations for the DRC collector to the merge queue.
github-merge-queue[bot] removed PR #12974 A handful of optimizations for the DRC collector from the merge queue.
fitzgen updated PR #12974.
fitzgen has enabled auto merge for PR #12974.
fitzgen updated PR #12974.
fitzgen updated PR #12974.
fitzgen updated PR #12974.
fitzgen updated PR #12974.
fitzgen added PR #12974 A handful of optimizations for the DRC collector to the merge queue.
fitzgen removed PR #12974 A handful of optimizations for the DRC collector from the merge queue.
fitzgen merged PR #12974.
Last updated: Apr 12 2026 at 23:10 UTC