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

refactor(rust): Remove StdWindow in rolling #9486

Merged
merged 2 commits into from
Jun 22, 2023

Conversation

magarick
Copy link
Contributor

Simplifies the code by using VarWindow and taking the sqrt in place any time the rolling StdWindow would have been used. I tested the performance and it's either the same or even a little better in some cases(faster to take the sqrt of contiguous numbers all at once rather than one at at time?)

@github-actions github-actions bot added refactor Code improvements that do not change functionality rust Related to Rust Polars labels Jun 21, 2023
@ritchie46
Copy link
Member

Nice, that cleans up a lot of code. Do we maintain the same numerical stability?

@magarick
Copy link
Contributor Author

Nice, that cleans up a lot of code. Do we maintain the same numerical stability?

Results are the same.

@ritchie46
Copy link
Member

Yeap, you are right, we do exactly the same. Nice.. Always good to have less code to compile. :)

@ritchie46 ritchie46 merged commit 1cf86d8 into pola-rs:main Jun 22, 2023
@magarick magarick deleted the sd-is-sqrt-var branch June 22, 2023 07:04
c-peters pushed a commit to c-peters/polars that referenced this pull request Jul 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactor Code improvements that do not change functionality rust Related to Rust Polars
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants