Consumer benchmark: zig-utils/zig-js#62 Follow-up to zig-utils/zig-js#79.
Problem
zig-js bounded object_churn allocates millions of short-lived ordinary objects with only a 256-object live ring. Survivors promoted per minor cycle are far below Heap.min_nursery_threshold_bytes, so nextNurseryThreshold repeatedly clamps to the fixed 4 MiB floor. The profile remains dominated by collectYoung / sweepPhaseLocked / backing frees.
Experiment
- compare the current 4 MiB floor/default with an 8 MiB floor/default in the generic collector;
- keep all adaptive growth/decay, promotion accounting, young-prefix bounds, remembered edges, and full-collection behavior unchanged;
- use an untouched current zig-js
mainrunner versus a runner rebuilt only against the candidate zig-gc; - run seven alternating process pairs, three timed
object_churnsamples each, with exact checksum validation; - inspect nursery telemetry and run focused zig-gc nursery tests before any full suite.
Acceptance
- meaningful and consistent direct
object_churnreduction, not a single noisy sample; - exact checksums across all A/B samples;
- adaptive nursery tests updated to express the selected floor rather than hiding drift;
- zig-gc full tests and zig-js focused GC/harness tests pass before landing;
- reject and fully revert if fewer cycles merely trade into worse per-cycle latency or memory behavior.