-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
PERF: tz_convert/tz_convert_single #35087
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
Conversation
@@ -57,9 +57,10 @@ def test_tz_convert_single_matches_tz_convert(tz_aware_fixture, freq): | |||
], | |||
) | |||
def test_tz_convert_corner(arr): | |||
result = tzconversion.tz_convert( | |||
arr, timezones.maybe_get_tz("US/Eastern"), timezones.maybe_get_tz("Asia/Tokyo") | |||
) |
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.
is this test no longer relevant?
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 PR requires that one of the two args be UTC
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.
hmm, that's what tz_convert_single was doing before? so what's the difference now between tz_convert and tz_convert_single? and is converting between 2 tzs no longer needed?
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.
so what's the difference now between tz_convert and tz_convert_single?
One handles a scalar (i.e. Timestamp) the other handles an array. I'm trying to de-duplicate these further, havent found a way to do so without a perf hit.
and is converting between 2 tzs no longer needed?
correct.
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.
looks fine, @simonjayhawkins comment
Making these follow the same pattern we use elsewhere, we get a perf bump:
Next up is making sure we have full asv coverage for tz_convert/tz_convert_single, analogous to #35075. That can either be separate or added to this PR.