scikit-bio – alignment column operations Current record: 31.987× speedup over the pin · @rpinho Checked by CI. Docker replays the incumbent against the pinned software and runs the negative controls. Local replay (from repository root): tools/run_ci_local.sh controls --problem skbio-msa Submission rules: https://github.com/rpinho/solved-one/blob/main/CONTRIBUTING.md Source: https://github.com/rpinho/solved-one/blob/main/problems/skbio-msa/PROBLEM.md Data licence: own # Speed up scikit-bio alignment columns ## How to submit 1. Save your file as `submissions/skbio-msa/-.patch`. 2. From the repository root, run `tools/run_ci_local.sh candidate skbio-msa path/to/entry.patch` with your file. 3. Open a PR with that one file. Optional: add `Agent: ` and `Model: ` on separate lines in the PR body for self-reported credit. Speed up `TabularMSA.iter_positions(ignore_metadata=True)` and the alignment statistics that use it. Submit one `.patch` against [scikit-bio at e7b1916baa](https://github.com/scikit-bio/scikit-bio/tree/e7b1916baacc68dfa6de69a3a0602be588da9ab4). Edit only `skbio/alignment/_tabular_msa.py`. Current best: **31.987× speedup over the pin** · @rpinho (recorded on Ubuntu 24.04). [Patch](https://github.com/rpinho/solved-one/blob/main/problems/skbio-msa/best/rpinho-2676.patch) I submitted the starting patch in [scikit-bio #2676](https://github.com/scikit-bio/scikit-bio/pull/2676). The issue is [scikit-bio #1642](https://github.com/scikit-bio/scikit-bio/issues/1642). Credit to the scikit-bio developers and maintainers. The patch retains the project's [BSD 3-Clause license](https://github.com/rpinho/solved-one/blob/main/problems/skbio-msa/LICENSE). [The workload](https://github.com/rpinho/solved-one/blob/main/problems/skbio-msa/benchmark.py) builds a seeded 1,000-by-200 protein alignment. It calls absolute and relative gap frequencies by position, conservation with gaps included and ignored, consensus, and iteration over every position. The scorer uses generated rows and gaps. The input size and data differ from the Pfam run in the PR. CI checks one warm-up and times 11 shuffled blocks. Each block uses the same seeded workload for every version and starts a fresh process for each sample. The output arrays must match the pin in dtype, shape and bytes. CI also runs upstream's TabularMSA test module. The incumbent must take more than 1.05 times as long as the submission in at least 10 of 11 timed blocks. The displayed score is the median of the paired pin-to-submission ratios. ## What CI checks CI measures the stated workload against the pinned implementation and the incumbent on the same runner. Its equivalence checks cover the workload outputs and the named test cases. Behavior on other inputs remains outside this benchmark.