ReviewOS

zig-utils/zig-js

Stop repeated atomic optimizer-profile writes in hot shared loops

#442
Closed chris opened this 11 days ago ·
11 days ago

Problem

Optimizer binary profiles performed atomic read-modify-writes for kinds already published millions of iterations earlier, forcing shared-realm workers to contend on hot per-instruction bytes.

Acceptance

  • Binary operand profiling performs atomic writes only for newly observed kind bits.
  • Concurrent observations converge without losing any kind.
  • Normal and TSan focused coverage remains green.
  • The exact eight-lane arithmetic reproducer returns near the accepted scale.
  • The complete comparison publication is regenerated after the batched contention fixes.

Result

4c0d04b load-checks monotonic profile bits before atomic OR and retains race-safe convergence. The focused profile tests pass 4/4 normally and under TSan. The exact eight-lane reproducer improved from 84.0 seconds to 2.308 seconds; the July 22 full matrix and all 1,540 samples are published. The complete unit suite passes 1,404/1,404.

11 days ago

Completed by 4c0d04b. The hot shared arithmetic reproducer is back from 84.0 s to 2.308 s; focused normal/TSan and full-suite evidence are green.

Sign in to comment on this issue.