-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
PERF: regression in getattr for IntervalIndex #30742
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
Comments
cc @jbrockmendel this might be related: #30605 |
#30605 changed _ndarray_values from a cache_readonly to a property. Easy to update. |
That might be easy to update, but I am not sure that this explains the slowdown in the other attributes / slowdown in dependent functionality? Eg pd.cut (the actual benchmark I was investigating):
This |
On master right now, https://github.com/pandas-dev/pandas/pull/30717/files is adding an |
Reopening this because the other attributes are still slower (the |
The original |
is this fixed @jorisvandenbossche |
Not in general, only the specific case of the |
Any suggestions for the IIUC, the additional overhead comes from going through
|
indexes.extension.inherit_names has a cache kwarg to turn a property into a cache_readonly. I can update #30860 to make closed (and anything else?) cached. |
I think just |
I don't think it's just I think we could also have a version of PandasDelagate that is specific for the indexes that have |
@jbrockmendel does #30860 close this, or is the caching being done in a separate PR? Or do we want a PandasDelegate subclass that's specific to cases where |
BTW, I don't think this should necessarily be a blocker for 1.0. |
#30860 did the caching for |
moved off 1.1.1 milestone (scheduled for this week) as no PRs to fix in the pipeline |
moved off 1.1.2 milestone (scheduled for this week) as no PRs to fix in the pipeline |
moved off 1.1.3 milestone (overdue) as no PRs to fix in the pipeline |
moved off 1.1.4 milestone (scheduled for release tomorrow) as no PRs to fix in the pipeline |
Closing as fixed |
Master:
while on 0.25.3:
(just checked a few attributes, didn't check if it is related to those specific ones or getattr in general)
I think this is a cause / one of the causes of several regressions that can currently be seen at https://pandas.pydata.org/speed/pandas/ (eg https://pandas.pydata.org/speed/pandas/#reshape.Cut.time_cut_timedelta?p-bins=1000&commits=6efc2379-b9de33e3)
The text was updated successfully, but these errors were encountered: