Skip to content

Use flat arrays in p7_Builder_MaxLength - #23

Open
kevinmoran1988 wants to merge 1 commit into
TravisWheelerLab:mainfrom
kevinmoran1988:maxlength-flat-arrays
Open

kevinmoran1988 wants to merge 1 commit into
TravisWheelerLab:mainfrom
kevinmoran1988:maxlength-flat-arrays

Conversation

@kevinmoran1988

Copy link
Copy Markdown
Contributor

p7_Builder_MaxLength() kept its two DP columns as 3(M+1) separately allocated 2-element rows, and re-read hmm->t[k] and recomputed (1 - t) inside the inner loop. This uses flat columns, widens the transitions to double once, and carries the current column's M[k-1] and D[k-1] in locals so the D recurrence no longer goes through memory. The operations and their order are unchanged, so max_length is identical.

bathbuild over 5232 dipteraODB12 alignments, serial, 3 runs each, in seconds:

base 230.97 / 232.23 / 229.27
patch 224.01 / 226.81 / 224.33 (1.03x)

Output byte-identical to base on that corpus.

🤖 Generated with Claude Code

Replace per-state 2-element row allocations with flat columns, widen
transitions to double once, and carry the current column's M[k-1] and
D[k-1] in locals. Same operations in the same order.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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