Repository navigation
Conversation
mb_anchor() batches suffix-array lookups (mb_bwt_sa_batch) so their cold-DRAM latency overlaps. Raising the batch depth from 20 to 128 keeps more SA walks in flight, hiding more of the 6.4 GB BWT's memory latency. Byte-identical: the depth only changes how many lookups overlap, not the results. Measured end-to-end wall on an idle arm64 host (M3 Ultra), >=30s runs, SAM byte-identical: +1.9% WGS short-read (5M pairs, 31.8s) and +3.9% HiFi (110k reads, 43s). 128 beat 64 on both workloads. cf. lh3#16 (which filed 64).
|
Note Reviews pausedUse the following commands to manage reviews:
Use the checkboxes below for quick actions:
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: trueThanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Owner
Author
|
@coderabbitai pause |
✅ Action performedReviews paused. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Raise the SA-lookup batch depth in
mb_anchor(seed.c) from 20 to 128. This is the number of small SA intervals accumulated beforemb_bwt_sa_batch()resolves them together; a deeper batch keeps more independent SA walks in flight, so the software-pipelined prefetch hides more FM-index DRAM latency per stall.Output is byte-identical
The change only affects how many SA lookups are batched, never their results. Verified SAM byte-identical to stock (order-independent record comparison):
Performance
Whole-aligner wall,
-t 16, hg38, runs sized to >=30 s:Safety
batch_sizesizes nothing on the stack:m_a = max(max_occ, batch_size)and the working arraysa/bareKmalloc'd tom_a, and the flush testq->size + m > batch_sizeis a threshold. Raising the constant only enlarges a heap allocation and defers flushes.cf. lh3#16, which proposed 64.