astropy/halotools

Migrate endpoint treatment of bin-free CAM into Cython

Opened this issue · 0 comments

In the bin-free CAM implementation introduced in #888, the first and last nwin elements are treated using the naive pure python algorithm. For typical nwin values of a few hundred, the runtime is only tens of ms, so it was easier to just stick with naive python since the bookkeeping of the indices at the endpoints is tedious. But the runtime is hundreds of ms for nwin>~1000, a sizeable fraction of the total runtime, so the endpoints would be better treated within cython. Brute force unit-testing against the naive python algorithm is already implemented, so all the infrastructure is present to facilitate the improvement.