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

PERF: Fix performance regression in isin for empty values #49839

Merged
merged 4 commits into from
Nov 23, 2022

Conversation

phofl
Copy link
Member

@phofl phofl commented Nov 22, 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.

Restores previous performance on my machine and gives us a speedup in other places

     [9f687cbc]       [17a3be81]
-     1.75±0.02μs        297±0.6ns     0.17  libs.InferDtype.time_infer_dtype_skipna('empty')
-      1.89±0.2μs        296±0.8ns     0.16  libs.InferDtype.time_infer_dtype('empty')

#49162

@phofl phofl added Performance Memory or execution speed performance Regression Functionality that used to work in a prior pandas version Algos Non-arithmetic algos: value_counts, factorize, sorting, isin, clip, shift, diff labels Nov 22, 2022
@phofl phofl added this to the 1.5.3 milestone Nov 22, 2022
@phofl
Copy link
Member Author

phofl commented Nov 22, 2022

Cc @rhshadrach

Copy link
Member

@rhshadrach rhshadrach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Co-authored-by: Matthew Roeschke <10647082+mroeschke@users.noreply.github.com>
@rhshadrach rhshadrach merged commit a94e852 into pandas-dev:main Nov 23, 2022
@rhshadrach
Copy link
Member

Thanks @phofl

@lumberbot-app
Copy link

lumberbot-app bot commented Nov 23, 2022

Oops, something went wrong applying the patch ... Please have a look at my logs.

@phofl
Copy link
Member Author

phofl commented Nov 23, 2022

@meeseeksdev backport 1.5.x

meeseeksmachine pushed a commit to meeseeksmachine/pandas that referenced this pull request Nov 23, 2022
@phofl phofl deleted the isin_performance branch November 23, 2022 09:08
phofl added a commit that referenced this pull request Nov 23, 2022
…in isin for empty values) (#49860)

Backport PR #49839: PERF: Fix performance regression in isin for empty values

Co-authored-by: Patrick Hoefler <61934744+phofl@users.noreply.github.com>
mliu08 pushed a commit to mliu08/pandas that referenced this pull request Nov 27, 2022
…#49839)

Co-authored-by: Matthew Roeschke <10647082+mroeschke@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Algos Non-arithmetic algos: value_counts, factorize, sorting, isin, clip, shift, diff Performance Memory or execution speed performance Regression Functionality that used to work in a prior pandas version
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants