Skip to content

PERF: Delay creation of indexer in RangeIndex.sort_values #48801

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 5 commits into from
Sep 27, 2022

Conversation

mroeschke
Copy link
Member

  • All code checks passed.
  • Added an entry in the latest doc/source/whatsnew/v1.6.0.rst file if fixing a bug or adding a new feature.
In [2]: ri = pd.RangeIndex(1_000_000)

In [3]: %memit ri.sort_values() # PR
peak memory: 120.22 MiB, increment: 0.10 MiB

In [4]: %memit ri.sort_values() # main
peak memory: 119.88 MiB, increment: 0.17 MiB
@mroeschke mroeschke added Performance Memory or execution speed performance Index Related to the Index class or subclasses labels Sep 26, 2022
@phofl phofl added this to the 1.6 milestone Sep 27, 2022
@phofl phofl merged commit 49d4c07 into pandas-dev:main Sep 27, 2022
@phofl
Copy link
Member

phofl commented Sep 27, 2022

@mroeschke mroeschke deleted the enh/ri_setops_sort branch September 27, 2022 16:28
@mroeschke mroeschke modified the milestones: 1.6, 2.0 Oct 13, 2022
noatamir pushed a commit to noatamir/pandas that referenced this pull request Nov 9, 2022
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
2 participants