You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Tracks rank 23 in benchmarks/OPTIMIZATION_ROADMAP.md: AdditiveChi2Sampler.transform. Complete the roadmap optimization hypothesis with sklearn-parity-gated benchmark evidence, then update the roadmap evidence/disposition before closing.
Implementation ready
PR #319 precomputes the Fourier frequencies once per transform call, skips redundant zero writes into the calloc-backed output matrix, and replaces hot-loop matrix helper calls with direct row-major Matrix.data access. A focused regression test compares every output cell against the previous implementation on mixed positive/zero/negative inputs and includes an identical-workload A/B timing harness.
The branch has been rebuilt on current main; generated benchmark/roadmap artifacts were removed from the review diff. Fresh CI is fully green: Flow syntax/import validation, canonical benchmark/parity, scaled benchmark/self-baseline gate, Python package, and all tests/examples pass. The dedicated AdditiveChi2 optimization test passes in the full suite. PR #319 is now ready for review; keep this issue open until it lands and the roadmap evidence is regenerated on main.
The optimized hot loop is present on main: the transform now precomputes the Fourier frequencies once per call, skips the redundant zero writes into the calloc-backed output, and indexes X.data / result.data directly instead of going through matrix_at/matrix_set per element (see lib/scikit/kernel_approximation.flow around lines 344-351). The regression test tests/test_additive_chi2_transform_optimization.flow is also on main.
Nothing further to do here, so closing. No new PR opened for this issue.
Activity
perf(kernel-approximation): specialize AdditiveChi2 transform (#232)
godofecht commentedon Aug 18, 2026
Verified this is already delivered on
main.PR #319 ("Optimize AdditiveChi2Sampler.transform hot loop") is MERGED and its commit is on
origin/mainas a992995:The optimized hot loop is present on
main: the transform now precomputes the Fourier frequencies once per call, skips the redundant zero writes into the calloc-backed output, and indexesX.data/result.datadirectly instead of going throughmatrix_at/matrix_setper element (seelib/scikit/kernel_approximation.flowaround lines 344-351). The regression testtests/test_additive_chi2_transform_optimization.flowis also onmain.Nothing further to do here, so closing. No new PR opened for this issue.