Expand description
Banded alignment and SIMD-ready alignment kernels.
Provides banded variants of Needleman-Wunsch and Smith-Waterman that restrict
computation to a diagonal band of width 2 * bandwidth + 1, reducing work
from O(mn) to O(m × bandwidth).
True SIMD vectorization (SSE4.1, AVX2, NEON) is deferred until profile-guided benchmarks justify the complexity. The banded algorithms here serve as the scalar baseline and are already significantly faster for long sequences with bounded edit distance.
Functions§
- banded_
nw - Banded Needleman-Wunsch (global) alignment.
- banded_
score_ only - Score-only banded alignment (no traceback). Uses O(bandwidth) memory.
- banded_
semi_ global - Banded semi-global alignment.
- banded_
sw - Banded Smith-Waterman (local) alignment.