The per-ring value histogram of the plain ring pass was laid out [ring][value], so the counters of
neighbouring pixels - neighbouring rings, low values - lay 4 KB apart and fell in the same few L1
sets, evicting each other on every pixel. Indexed [value][ring] they share a few cache lines. The
sigma-clip passes read it value-major; integer sums, so the same totals.
Measured on a 16M-pixel frame (microbenchmark of AccumulateRingsBlock, Apple M6): 0.97 -> 0.80
ns/pixel on a P core, 5.3 -> 3.7 on an E core. The function was 9-38% of CPU on the battery sets run
CPU-only; one small-molecule set ran 4% faster end to end.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>