Problem
The fixed object-allocation loop replaces a present dense array element with a freshly allocated managed object on every iteration. Its generic replaceDenseElement barrier classifies both exact GC payload pointers through zig-gc’s tolerant live-payload index, which remains visible in the object_churn profile.
Scope
- Add a narrow exact-managed value barrier in
gc.zig backed by zig-gc#10.
- Add an explicitly prevalidated, exclusive dense replacement primitive that omits its own generic barrier.
- Use that pair only in the isolated object-allocation quick loop when the active allocator is the GC heap; preserve the existing arena/generic path.
- Keep the per-iteration restriction check and all loop bailout semantics unchanged.
- Add focused coverage proving the quick loop still runs correctly in both arena and GC modes, including nursery collection.
- Compare pinned alternating runs against
cfed7bc5; land only if the exact-checksum benchmark shows a repeatable win.
- Run the batched full suite only after a measured win.
Acceptance
- Exact managed owner/child barrier preserves nursery and incremental invariants.
object_churn checksum remains 1030552128.
- Candidate beats the pinned baseline across paired samples.
- Commit references this issue and is pushed to
main as Chris without coauthors.
Problem
The fixed object-allocation loop replaces a present dense array element with a freshly allocated managed object on every iteration. Its generic
replaceDenseElementbarrier classifies both exact GC payload pointers through zig-gc’s tolerant live-payload index, which remains visible in theobject_churnprofile.Scope
gc.zigbacked by zig-gc#10.cfed7bc5; land only if the exact-checksum benchmark shows a repeatable win.Acceptance
object_churnchecksum remains1030552128.mainas Chris without coauthors.