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: RangeIndex.argmin/argmax #57823

Merged
merged 8 commits into from
Mar 14, 2024
Merged

Conversation

mroeschke
Copy link
Member

In [1]: import pandas as pd

In [2]: ri = pd.RangeIndex(100_000)

In [3]: %timeit ri.argmin()
651 ns ± 8.43 ns per loop (mean ± std. dev. of 7 runs, 1,000,000 loops each)  # PR

In [3]: %timeit ri.argmin()
19.6 µs ± 73 ns per loop (mean ± std. dev. of 7 runs, 10,000 loops each)   # main

@mroeschke mroeschke added Performance Memory or execution speed performance Index Related to the Index class or subclasses labels Mar 12, 2024
@mroeschke mroeschke added this to the 3.0 milestone Mar 13, 2024
@WillAyd WillAyd merged commit d79910c into pandas-dev:main Mar 14, 2024
47 checks passed
@WillAyd
Copy link
Member

WillAyd commented Mar 14, 2024

Thanks @mroeschke

@mroeschke mroeschke deleted the perf/ri/argminmax branch March 14, 2024 15:07
pmhatre1 pushed a commit to pmhatre1/pandas-pmhatre1 that referenced this pull request May 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Index Related to the Index class or subclasses Performance Memory or execution speed performance
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants