astropy / astropy/halotools

Migrate endpoint treatment of bin-free CAM into Cython

Open
#891 0 comments 0 reactions 1 assignee Claimed by @aphearin View on GitHub
empirical-models performance-enhancement
Dominant language
Python
Stars
120
Forks
70
PR merge metrics
No merged PRs in 30d

Description

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.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.