-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
PERF: groupby.transform broadcast perf #45708
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: groupby.transform broadcast perf #45708
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.
Nice. Could you check if we have an asv for that case?
@phofl - there are not many groupby transform asvs that hit this code path. I just added one for this case. |
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.
thx
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.
We like to target ASVs to be around 80ms, is that right? Just want to make sure, looks appropriate as-is.
yeah generally < 100ms is good, but we have a lot that are not so can cleanup separately. |
thanks @lukemanley |
groupby.transform
broadcasts user-defined functions by passing a repeated array to np.concatenate. Passing the array once to np.tile and letting numpy repeat the array is quite a bit faster.