GSoC 2026 · Milestone 2 of 4 · scikit-bio

June: CPU Numba Performance, Merged

June turned the first week's foundation into a complete, merged CPU story. Every item queued behind PR #2470 landed, and the PERMANOVA kernel went through a performance arc that ended competitive with the hand-written C++ reference.

← GSoC hub scikit-bio ↗
8xOver single-perm Cython
~2.4xOff the C++ reference
25,000²Largest benchmark size
<1e-15Numerical agreement

Merged Pull Requests

scikit-bio #2470

Numba CPU s_W helpers for PERMANOVA

The May in-review PR merged after the test-against-a-trusted-reference and partial-sum revisions.

scikit-bio #2484

Parallelize the PERMANOVA engine across the permutation axis

Flipped the parallel axis from matrix rows to permutation blocks, so each thread handles whole permutations — a better fit for the Monte-Carlo permutation workload.

scikit-bio #2486

Measure Numba code coverage by disabling the JIT

Running under NUMBA_DISABLE_JIT lets coverage tooling see inside the compiled functions, so the Numba paths are properly reported.

scikit-bio #2488

Single-pass row-tile PERMANOVA kernel

The performance breakthrough: a cache-tiled kernel that reads the distance matrix once across all permutations instead of once per permutation. Roughly 8× over the original Cython single-permutation path, and within a small factor of the hand-optimized C++ reference at large scale.

scikit-bio #2490

Optional Numba support merged to main

The Numba engine line landed in the main branch. Numba is opt-in (falling back to Cython when it is not installed), and the function suffix was aligned to the existing _cy convention. This closed out the CPU phase.

The performance arc

The kernel evolved from a direct Cython port, to a parallel-over-permutations version, to a single-pass row-tiled kernel that amortises the matrix read across the whole permutation batch. Benchmarks were run at up to 25,000×25,000 distance matrices with 9,999 permutations, against an OpenMP-enabled baseline, with numerical agreement asserted below 1e-15 between paths.

By the end of June the Numba CPU engine matched or beat the existing paths and was merged into main — clearing the way for the GPU phase covered in the next milestone.