Skip to content

stride-align 0.3.0

Choose a tag to compare

@adamdeprince adamdeprince released this 24 May 15:44

stride-align 0.3.0

Highlights (full details in CHANGELOG.md):

New scorers

  • Indel distance (Scorer.INDEL / Scorer.INDEL_NORMALIZED) — Levenshtein restricted to insertions and deletions; bit-parallel Allison-Dix single-word kernel.
  • True (unrestricted) Damerau-Levenshtein (Scorer.TRUE_DAMERAU_LEVENSHTEIN / Scorer.TRUE_DAMERAU_LEVENSHTEIN_NORMALIZED) — the unrestricted form where a character may participate in multiple edits. Existing Scorer.DAMERAU_LEVENSHTEIN continues to refer to OSA.

cdist pruning + cutoff push-down

  • Length-difference pruning for cdist_above_threshold and cdist_top_k.
  • Row-sort by query length in cdist_top_k.
  • Per-pair cutoff push-down into the Myers (Lev), OSA, and Hamming SIMD inner loops.
  • Cross-arch geomean 426x speedup at threshold 0.99 vs the unpruned baseline (24 scorer×host cells, median 512x, range 145x–1408x). See BENCHMARK.md and the Loongson vs Tiger Lake report (简体中文).

Fixes

  • macOS / LoongArch64 cdist_above_threshold iteratornb::stop_iteration across DSO boundaries was surfacing as RuntimeError instead of StopIteration. Now uses the Python C API (PyErr_SetNone(PyExc_StopIteration) + null nb::object return). Fixes 91 macOS test failures.

Build / packaging

  • Python 3.9 support (was 3.10+). The three match blocks became dict lookups; everything else was already 3.9-compatible.
  • C++23 → C++20 build requirement. The codebase didn't actually use any C++23 stdlib feature; lowering lets older toolchains (gcc 10) build the project. Two libstdc++-10 gaps (std::bit_cast, std::make_unique_for_overwrite) bridged with feature-test-gated fallbacks. See docs/power8-gcc10-workarounds.md.

Distribution

  • PyPI (pip install stride-align): sdist + 23 wheels —

    • 6 manylinux_2_27 x86_64 (cp39–cp314)
    • 6 musllinux_1_2 x86_64 (cp39–cp314)
    • 5 manylinux_2_39 aarch64 (cp310–cp314)
    • 6 macOS arm64 (cp39–cp314)
  • This GitHub release: only the Linux LoongArch64 wheel (cp313), which PyPI's platform-tag list doesn't yet accept. Install with:

    pip install \
      https://github.com/adamdeprince/stride-align/releases/download/v0.3.0/stride_align-0.3.0-cp313-cp313-linux_loongarch64.whl

    See README §安装 for the full Loongson install recipe.

docs