Repository navigation
norm: decode each tag once when splitting multiallelic records - #2620
Open
BenjaminDEMAILLE wants to merge 1 commit into
Open
BenjaminDEMAILLE wants to merge 1 commit into
BenjaminDEMAILLE wants to merge 1 commit into
Conversation
split_multiallelic_to_biallelics() decoded every INFO and FORMAT tag once per ALT. Decode once, cache, and copy to the scratch buffer per ALT (the split_* functions modify it). Output is unchanged. norm -m- on 20k sites x 6 ALTs, 200 samples: -Ou 2.39s -> 1.86s CPU. Idea from pasta (https://github.com/DylanCosto/pasta, MIT). Assisted-by: Claude:claude-opus-5-5 Signed-off-by: Benjamin Demaille <benjamin.demaille@icloud.com>
BenjaminDEMAILLE
force-pushed
the
perf/norm-split-decode-once
branch
2 times, most recently
from
November 24, 2026 09:46
6b6ba63 to
0acf96a
Compare
This branch has not been deployed
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.
When splitting multiallelics, I saw that
split_multiallelic_to_biallelics()decodes every INFO and FORMAT tag once per ALT. I changed it to decode each tag once, cache it, and copy it into the scratch buffer for each ALT (the split functions modify it in place). The output doesn't change, and records with a single ALT aren't affected.norm -m-on a synthetic gnomAD-like file (20k sites x 6 ALTs, 200 samples) went from 2.39s to 1.86s CPU with-Oufor me.make testpasses.I adapted it from pasta (https://github.com/DylanCosto/pasta, MIT).
I've listed this with my other performance PRs in samtools/htslib#2175.
Assisted-by: Claude:claude-opus-5-5