Skip to content

PERF: Calculate mask in interpolate only once #50326

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

Merged
merged 3 commits into from
Dec 19, 2022

Conversation

phofl
Copy link
Member

@phofl phofl commented Dec 17, 2022

  • closes #xxxx (Replace xxxx with the GitHub issue number)
  • Tests added and passed if fixing a bug or adding a new feature
  • All code checks passed.
  • Added type annotations to new arguments/methods/functions.
  • Added an entry in the latest doc/source/whatsnew/vX.X.X.rst file if fixing a bug or adding a new feature.

Gives us an easy 10% speedup

PR: 15.4 ms ± 266 µs per loop (mean ± std. dev. of 7 runs, 100 loops each)
Main: 17 ms ± 69.3 µs per loop (mean ± std. dev. of 7 runs, 100 loops each)

@phofl phofl added Performance Memory or execution speed performance Numeric Operations Arithmetic, Comparison, and Logical operations labels Dec 17, 2022
@gfyoung
Copy link
Member

gfyoung commented Dec 18, 2022

LGTM pending CI

@mroeschke mroeschke added this to the 2.0 milestone Dec 19, 2022
@mroeschke mroeschke merged commit edd401b into pandas-dev:main Dec 19, 2022
@mroeschke
Copy link
Member

Thanks @phofl

@phofl phofl deleted the perf_interpolate branch December 19, 2022 19:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Numeric Operations Arithmetic, Comparison, and Logical operations Performance Memory or execution speed performance
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants