-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed
Labels
performancewasm-proposal:gcIssues with the implementation of the gc wasm proposalIssues with the implementation of the gc wasm proposal
Description
Hashing is expensive and the fact that the bump chunk can fill and needs draining conflates "need GC" with "the bump chunk is full" and "the GC heap is at capacity".
Instead, we should:
- Add what is logically a
Option<VMGcRef>
to the DRC's object header. This forms an intrusive singly-linked list that implements the over-approximation set, which is implemented with a hash set today, but this approach doesn't need any hashing or external allocations. - Replace the precise hash set with a mark bit in the object header. Again, no more hashing or external-to-the-gc-heap allocation or storage.
With that, DRC sweeping is still logically the same: walk over the over-approximation set, decref any object that is not in the precise set, and reset the over-approximation set to be the precise set. However, this will now be implemented as a mutable traversal of the over-approximation linked list.
This should result in a large speed up for test cases like #11141
Metadata
Metadata
Assignees
Labels
performancewasm-proposal:gcIssues with the implementation of the gc wasm proposalIssues with the implementation of the gc wasm proposal