Skip to content

PERF: Join non unique #56817

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 4 commits into from
Jan 11, 2024
Merged

PERF: Join non unique #56817

merged 4 commits into from
Jan 11, 2024

Conversation

lukemanley
Copy link
Member

Seeing ~10% improvement when how is "left", "right", or "inner".

import pandas as pd 
import numpy as np

idx1 = pd.Index(np.tile(np.arange(1000), 1000))
idx2 = pd.Index(np.arange(100))

%timeit idx1.join(idx2, how="left")

# 103 ms ± 1.61 ms per loop (mean ± std. dev. of 7 runs, 10 loops each)  -> main
# 90.6 ms ± 504 µs per loop (mean ± std. dev. of 7 runs, 10 loops each)  -> PR

@lukemanley lukemanley added Performance Memory or execution speed performance Reshaping Concat, Merge/Join, Stack/Unstack, Explode labels Jan 10, 2024
@lukemanley lukemanley added this to the 2.3 milestone Jan 10, 2024
@lithomas1 lithomas1 modified the milestones: 2.3, 3.0 Jan 11, 2024
@mroeschke mroeschke merged commit dca658b into pandas-dev:main Jan 11, 2024
@mroeschke
Copy link
Member

Thanks @lukemanley

pmhatre1 pushed a commit to pmhatre1/pandas-pmhatre1 that referenced this pull request May 7, 2024
* PERF: join non-unique

* whatsnew
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 Reshaping Concat, Merge/Join, Stack/Unstack, Explode
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants