Skip to content

REGR/PERF: Index.is_ performance regression #37400

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 1 commit into from
Oct 26, 2020

Conversation

topper-123
Copy link
Contributor

@topper-123 topper-123 commented Oct 25, 2020

Fixes #37321 (comment)

The offender is actually #37321. Apparantly is's a bit slow to do the check using a generator like com.any_none.

In [1]: from pandas import *
In [2]: idx_large_fast = RangeIndex(100000)
   ...: idx_small_slow = date_range(start="1/1/2012", periods=1)
   ...: mi_large_slow = MultiIndex.from_product([idx_large_fast, idx_small_slow])
   ...:
   ...: idx_non_object = RangeIndex(1)
In[3]: %timeit mi_large_slow.equals(idx_non_object)
3.13 µs ± 79.4 ns per loop  # master
2.09 µs ± 31.1 ns per loop  # This PR

@topper-123 topper-123 changed the title REGR/PERF: Index.is_ reformance regression REGR/PERF: Index.is_ performance regression Oct 25, 2020
@jreback jreback added the Performance Memory or execution speed performance label Oct 26, 2020
@jreback jreback added this to the 1.2 milestone Oct 26, 2020
@jreback jreback merged commit 0e5d004 into pandas-dev:master Oct 26, 2020
@jreback
Copy link
Contributor

jreback commented Oct 26, 2020

thanks @topper-123

@topper-123 topper-123 deleted the index.is_ branch October 26, 2020 08:03
JulianWgs pushed a commit to JulianWgs/pandas that referenced this pull request Oct 26, 2020
kesmit13 pushed a commit to kesmit13/pandas that referenced this pull request Nov 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Performance Memory or execution speed performance
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants