-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
PERF: merge on sorted MultiIndex #48504
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
PERF: merge on sorted MultiIndex #48504
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is faster in all possible cases? Meaning different dtypes
I just expanded the ASVs to cover additional dtypes and merge types. See the timings updated timings and commentary re: MultiIndex._union. |
@phofl - see updated times in the summary |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Thanks @lukemanley |
* merge on sorted multiindex performance * whatsnew * faster asv * additional asv cases * avoid going through multi._values
doc/source/whatsnew/v1.6.0.rst
file if fixing a bug or adding a new feature.Perf improvement when merging on a sorted
MultiIndex
. The improvement comes from avoidingMultiIndex._values
.Overall, seems to generalize across dtypes and merge types quite well. The ASVs show one slowdown when doing an outer merge with a datetime64 index. In that case the time is spent within MultiIndex._union. Coincidently, @phofl just opened #48505 which shows a nice improvement for datetimes in MultiIndex._union so that slowdown might well go away if #48505 is merged.
ASVs added:
[update]: updated times following the merge of #48505: