Skip to content

Conversation

@rhshadrach
Copy link
Member

@rhshadrach rhshadrach commented Dec 20, 2025

  • closes #xxxx (Replace xxxx with the GitHub issue number)
  • Tests added and passed if fixing a bug or adding a new feature
  • All code checks passed.
  • Added type annotations to new arguments/methods/functions.
  • Added an entry in the latest doc/source/whatsnew/vX.X.X.rst file if fixing a bug or adding a new feature.
  • If I used AI to develop this pull request, I prompted it to follow AGENTS.md.

This should address all regressions identified in pandas-dev/asv-runner#85 that we can due to #63370. I suspect there might be more places we want to pass copy=False, but haven't thought of a good way to find them.

The one regression that will remain is the benchmark of the Index constructor on taking an array, which is expected.

@rhshadrach rhshadrach added Performance Memory or execution speed performance Index Related to the Index class or subclasses labels Dec 20, 2025
@rhshadrach rhshadrach requested a review from mroeschke December 20, 2025 14:05
else:
values = np.concatenate([x._values for x in rng_indexes])
result = self._constructor(values)
result = self._constructor(values, copy=False)
Copy link
Member

Choose a reason for hiding this comment

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

there is a similar self._constructor(values) call a few lines above at 1234, where you can add a copy=False as well, I think

@mroeschke mroeschke added this to the 3.0 milestone Dec 20, 2025
@mroeschke mroeschke merged commit 2d6c51f into pandas-dev:main Dec 20, 2025
47 of 49 checks passed
@mroeschke
Copy link
Member

Thanks @rhshadrach feel free to follow up with other areas that need copy=False

@rhshadrach rhshadrach deleted the perf_avoid_index_copy branch December 21, 2025 14:07
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.

3 participants