Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce Python Layer Overhead #10

Merged
merged 1 commit into from
Apr 12, 2024
Merged

Reduce Python Layer Overhead #10

merged 1 commit into from
Apr 12, 2024

Conversation

azmyrajab
Copy link
Owner

This PR speeds up runtime by reducing overhead in python layer, specifically:

  • no unnecessary WLS weighting multiplications happen unless user has provided sample weights (it was multiplying expression by 1 implicitly before, which I assumed polars query engine cancelled - but it didn't causing some delay)
  • All casting to float64 happens in rust instead of python: it is faster to do there
  • refactors code-paths in least_squares.py to minimize duplication (cosmetic)
  • documents Maintain input series names, in rust, when a plugin is called within .over() context pola-rs/pyo3-polars#79 which, once resolved, will allow relying fully on rust layer to label struct output for mode="coefficients"

@azmyrajab azmyrajab mentioned this pull request Apr 12, 2024
@azmyrajab azmyrajab merged commit caeecbe into main Apr 12, 2024
7 of 11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant