Speed up Pairtools streaming selection Current record: 1.616× 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 pairtools-select Submission rules: https://github.com/rpinho/solved-one/blob/main/CONTRIBUTING.md Source: https://github.com/rpinho/solved-one/blob/main/problems/pairtools-select/PROBLEM.md Data licence: own # Speed up Pairtools streaming selection ## How to submit 1. Save your file as `submissions/pairtools-select/-.patch`. 2. From the repository root, run `tools/run_ci_local.sh candidate pairtools-select 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 projected .pairs output when a condition discards most rows. Submit one `.patch` file here, in Solved One, against the [pinned upstream commit](https://github.com/open2c/pairtools/tree/677b90858a36305d5092a02ed314b319f0a7eb34). Edit only `pairtools/cli/select.py`, `pairtools/lib/select.py`. Upstream pull requests do not enter this challenge. Name the file `submissions/pairtools-select/-.patch`. Current best: **1.616× speedup over the pin** · @rpinho (recorded on Ubuntu 24.04). [Patch](https://github.com/rpinho/solved-one/blob/main/problems/pairtools-select/best/rpinho-289.patch) I submitted the current patch in [open2c/pairtools #289](https://github.com/open2c/pairtools/pull/289). The [patch source](https://github.com/open2c/pairtools/commit/e965b9f505a40457c319c639961e143663ac47b3) was first proposed on 2026-11-26. Credit to the pairtools contributors who wrote and maintained the pinned implementation. The source patch retains the upstream [license](https://github.com/rpinho/solved-one/blob/main/problems/pairtools-select/LICENSE). The benchmark selects long-range uniquely mapped pairs from 240,000 synthetic records with seed-dependent pair types and distances and removes two optional trailing columns. See [the workload](https://github.com/rpinho/solved-one/blob/main/problems/pairtools-select/benchmark.py). 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 full ordered result file, including the projected header, must match the pin byte for byte. CI also runs pinned upstream tests. 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.