Skip to content

Perf: remove shared-realm object-churn GC scaling collapse #97

Description

@chrisbbreuer

Parent: #62
Related: #44, #49, #116, #118, #119, #120, #131

The accepted July 17 structured-stack matrix remains the latest complete zig-js/JavaScriptCore publication:

  • measured zig-js: 01fcf42c
  • report and raw 1,540-sample evidence
  • shared 1/2/4/8 object-churn medians: 190.969 / 293.039 / 683.870 / 1,651.879 ms
  • shared scaling: 1.00x / 1.30x / 1.12x / 0.92x

The accepted amortized-publication A/B improved the then-current contended rows without changing the lone-worker path. The issue remains open because the strict 1.0x eight-lane scaling target is not yet met.

Tracked follow-up

Acceptance

  • Profile the exact shared object-churn row with collector, safepoint, allocation, backing, and lock evidence.
  • Preserve object prototypes, initialized properties, indexed replacement, displaced reads, barriers, OOM behavior, exact checkpoints, and checksums.
  • Materially improve the formerly sub-0.65x eight-lane result.
  • Keep every shared lane at or above 1.0x scaling with repeated low-dispersion evidence.
  • Avoid direct/independent-path regressions by retaining their allocation policy.
  • Pass dependency normal+TSan, full zig-js units, focused TSan, and exact-parent A/B for retained changes.

Completion evidence — July 29, 2026

The final clean-tree publication measures runtime e690a866 with the steady shared harness at a7cf92c7, published by e4187c0f:

  • shared object-churn scaling: 1.26x / 1.16x / 1.20x at 2/4/8 lanes;
  • dispersion: 6.26% / 11.31% / 2.82% RSD at 2/4/8 lanes;
  • exact-parent reserve A/B: 59,200 → 1,600 publication batches, 4.83x faster at eight lanes, identical checksums, 1.001x RSS;
  • validation: zig-gc normal/ReleaseSafe/TSan, 1,460/1,460 zig-js units, focused TSan, benchmark publication gates, link check, and docs build.

Evidence: final report, 1,540 raw samples, and causal reserve A/B. This closes the sole remaining child of #49 and leaves #44 only the directly comparable independent object-churn rows.

Latest diagnosis

The #426 phase profile rules out rendezvous and tracing as the eight-lane collector cost. The #427 exact A/B then rules out backing bitmap/free-slot transitions alone: sweep improved only 0.7% while wall time regressed 0.9%, so both prototypes were reverted. Do not retry the rejected wait, threshold, unpublication, owned-enumeration, pressure-accounting, or whole-run-backing designs without new evidence. README scores remain tied to complete matrices only.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions