Skip to content

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
@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.

2 participants