Skip to content

PERF: indexing on UInt64Index with int64s #41972

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 2 commits into from
Jun 15, 2021

Conversation

jbrockmendel
Copy link
Member

@simonjayhawkins
Copy link
Member

This fixes a regression on master so should be backported to 1.3.x

@simonjayhawkins simonjayhawkins added the Regression Functionality that used to work in a prior pandas version label Jun 12, 2021
@simonjayhawkins
Copy link
Member

@jbrockmendel can you post some timings.

Copy link
Contributor

@jreback jreback left a comment

Choose a reason for hiding this comment

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

can u add a test here

@simonjayhawkins simonjayhawkins added Index Related to the Index class or subclasses Performance Memory or execution speed performance Indexing Related to indexing on series/frames, not to indexes themselves and removed Index Related to the Index class or subclasses labels Jun 12, 2021
@jbrockmendel
Copy link
Member Author

can u add a test here

not actually changing any behavior

can you post some timings

based on the asv mentioned in #41873

index = pd.UInt64Index(range(10**6))
ser = pd.Series(np.random.randn(10**6), index=index)

%timeit ser.loc[[800000]]
278 µs ± 12.3 µs per loop (mean ± std. dev. of 7 runs, 1000 loops each)   # <- PR
124 ms ± 1.13 ms per loop (mean ± std. dev. of 7 runs, 10 loops each)   # <- master

@jreback jreback added this to the 1.3 milestone Jun 15, 2021
@jreback jreback merged commit fe99429 into pandas-dev:master Jun 15, 2021
@jreback
Copy link
Contributor

jreback commented Jun 15, 2021

@meeseeksdev backport 1.3.x

@lumberbot-app
Copy link

lumberbot-app bot commented Jun 15, 2021

Something went wrong ... Please have a look at my logs.

@jbrockmendel jbrockmendel deleted the perf-41873 branch June 15, 2021 21:44
jreback pushed a commit that referenced this pull request Jun 15, 2021
JulianWgs pushed a commit to JulianWgs/pandas that referenced this pull request Jul 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Indexing Related to indexing on series/frames, not to indexes themselves 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.

PERF: performance regression in indexing UInt64Index with an array-like
3 participants