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

REF/PERF: MultiIndex.get_indexer with method #55839

Merged
merged 3 commits into from
Nov 6, 2023

Conversation

lukemanley
Copy link
Member

from asv_bench.benchmarks.multiindex_object import Integer

b = Integer()
b.setup()

%timeit b.time_get_indexer_and_backfill()

# 238 ms ± 39.6 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)     -> main
# 50.6 ms ± 2.98 ms per loop (mean ± std. dev. of 7 runs, 10 loops each)  -> PR

%timeit b.time_get_indexer_and_pad()

# 191 ms ± 30.3 ms per loop (mean ± std. dev. of 7 runs, 10 loops each)   -> main
# 50.4 ms ± 1.03 ms per loop (mean ± std. dev. of 7 runs, 10 loops each)  -> PR

@lukemanley lukemanley added Refactor Internal refactoring of code Performance Memory or execution speed performance MultiIndex labels Nov 5, 2023
@lukemanley lukemanley added this to the 2.2 milestone Nov 5, 2023
@lukemanley lukemanley requested a review from WillAyd as a code owner November 5, 2023 23:13
Copy link
Member

@WillAyd WillAyd left a comment

Choose a reason for hiding this comment

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

Nice! Always great to improve performance while reducing code.

A cursory glance tells me the failures are unrelated but worth merging main to be sure

@mroeschke mroeschke merged commit 2c12853 into pandas-dev:main Nov 6, 2023
28 of 34 checks passed
@mroeschke
Copy link
Member

Thanks @lukemanley (yeah these failures are not related)

@lukemanley lukemanley deleted the mi-get-fill-indexer branch November 16, 2023 12:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
MultiIndex Performance Memory or execution speed performance Refactor Internal refactoring of code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants