Skip to content

PERF: Return RangeIndex from RangeIndex.join when possible #57543

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

Closed
wants to merge 4 commits into from

Conversation

mroeschke
Copy link
Member

Discovered in #57441

@mroeschke mroeschke added Performance Memory or execution speed performance Index Related to the Index class or subclasses labels Feb 21, 2024
@mroeschke mroeschke added this to the 3.0 milestone Feb 21, 2024
join_index, lidx, ridx = super()._wrap_join_result(
joined, other, lidx, ridx, how
)
maybe_ri = self._shallow_copy(join_index._values)
Copy link
Member

Choose a reason for hiding this comment

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

Can we do this more efficiently based on the inputs?

Copy link
Member Author

Choose a reason for hiding this comment

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

That's fair. Yeah I think working on implementing RangeIndex._join_monotinic would be worth it so I'll close this one out

@mroeschke mroeschke closed this Feb 22, 2024
@mroeschke mroeschke deleted the perf/ri/join_result branch February 22, 2024 01:24
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.

2 participants