-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
PERF: investigate performance impact of iNaTs on tz-aware operations #24603
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
Comments
@qwhelan thanks for opening this. Do you have any idea how expensive the searchsorted calls are? i.e. are we sure this is worth optimizing? Some more context: we have a ~7 places in tslibs that do something like this:
The alternative would be to do the Some notes based on the last time I looked at this:
Big picture, we need to get a handle on how costly these searchsorted calls are. |
@jbrockmendel Thanks for your notes - I agree on most points. A couple points of clarification regarding numpy's implementation:
|
The relevant code now uses bisect_right_i8, which is optimized about as far as it will go. closing. |
Problem description
Placeholder issue for use of
np.searchsorted
inpd._libs.tslibs.conversion.tz_convert_dst()
introduced in #22181 and modified in #24491. The latter indicates that theiNaT
optimization comes at high cost for notnull data, but it's unclear at what fraction null should we attempt to optimize by skipping thenp.searchsorted()
call entirely.The text was updated successfully, but these errors were encountered: