BioForge v6.0.0 — SIMD extension + multi-core scaling
The genome mapper becomes competitive. Measured head-to-head against minimap2
on the same machine (WSL): from ~4x behind to ~1.3x, both single-threaded and
on 4 cores, mapping the same reads. Not promoted yet — this is an honest
measurement, not a headline.
Added
- AVX2-vectorised banded extension. The alignment DP is traversed by
anti-diagonals (independent cells) and processes 8 int32 cells per
instruction. The kernel goes from 88 to 529 M cells/s (6x); since the
extension is ~88% of mapping time, the full mapper is ~4x faster
single-threaded. Bit-identical to the scalar kernel (diag>up>left tie-break
replicated exactly); automatic scalar fallback when AVX2 is unavailable.
Fixed
- Real multi-core scaling in bio_map_batch: the OpenMP thread count was not
being reset, so after a single-threaded call, later calls stayed on one
thread and map_batch appeared not to scale. Now always set (n<=0 -> all
cores). Result: ~2.3x on 4 cores.
Benchmark (honest — WSL, 4.8 Mb genome, 6000 reads, 5% error, minimap2 -a)
- 1 thread: minimap2 ~2.4 vs BioForge ~1.8 Mb/s (~1.3x)
- 4 cores: minimap2 ~4.0 vs BioForge ~3.0 Mb/s (~1.3x)
- Both map all 6000. At E. coli scale; minimap2 may pull further ahead at
human-genome scale (not measured). A Python result-reconstruction tail
remains (the pure C engine already does ~4.85 Mb/s).
Tests
- SIMD<->scalar parity 0/10,000 (incl. pathological narrow band); valgrind
clean (0 errors / 0 leaks) on the SIMD kernel; map_batch identical across
1/2/3/4/all threads and equal to sequential map(). New tools/bench_vs_minimap2.py.
359 tests.