Skip to main content

Module simd

Module simd 

Source
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.