Skip to content

perf(placement): prefetch the table the scoring loop probes - #117

Merged
amkram merged 1 commit into
mainfrom
perf/fix-scoring-prefetch
Jul 13, 2026
Merged

perf(placement): prefetch the table the scoring loop probes#117
amkram merged 1 commit into
mainfrom
perf/fix-scoring-prefetch

Conversation

@amkram

@amkram amkram commented Jul 13, 2026

Copy link
Copy Markdown
Owner

No description provided.

computeChildMetrics prefetched seedFreqInReads and seedInverseGenomeCounts, but
the hot per-seed loop reads neither -- it probes logReadCounts, which was never
prefetched. So every per-seed lookup missed cache while bandwidth was spent
prefetching two tables that are never read here. Prefetch logReadCounts instead
(and drop the two dead prefetches).

A/B (single-thread): TB place -17% at t1 (5.63 -> 4.66s), -6% at t8, -4% at t16;
SARS place neutral (read-processing-bound, tables cache-resident). Placement
output byte-identical; unit + e2e + examples pass.

Found re-profiling the memory-bound scoring loop -- a single-socket taskset test
ruled out NUMA, pointing at cache/bandwidth, and the prefetch/lookup mismatch
was the culprit.
@amkram amkram changed the title perf(placement): prefetch the table the scoring loop actually probes perf(placement): prefetch the table the scoring loop probes Jul 13, 2026
@amkram
amkram merged commit bd73bdc into main Jul 13, 2026
4 checks passed
@amkram
amkram deleted the perf/fix-scoring-prefetch branch July 13, 2026 21:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant