-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
PERF: do NPY_NAT check inside get_datetime64_nanos #24031
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
Codecov Report
@@ Coverage Diff @@
## master #24031 +/- ##
===========================================
+ Coverage 42.46% 92.35% +49.88%
===========================================
Files 161 161
Lines 51557 51557
===========================================
+ Hits 21892 47613 +25721
+ Misses 29665 3944 -25721
Continue to review full report at Codecov.
|
1 similar comment
Codecov Report
@@ Coverage Diff @@
## master #24031 +/- ##
===========================================
+ Coverage 42.46% 92.35% +49.88%
===========================================
Files 161 161
Lines 51557 51557
===========================================
+ Hits 21892 47613 +25721
+ Misses 29665 3944 -25721
Continue to review full report at Codecov.
|
ival = get_datetime64_value(val) | ||
if ival == NPY_NAT: | ||
return NPY_NAT |
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.
does this hit a currently tested 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.
Yes. Within tests/indexes/datetimes there are 14
thanks @jbrockmendel |
Bonus of a little simplification in
array_to_datetime
The perf pickup comes from changing a python call
ts.view('i8')
to a cython callget_datetime64_value(ts)
.master (leaving out "The slowest run [...]"
PR
master
PR