-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
CLN: Use C-API for datetime.date #33222
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
LGTM pending green |
For my own understanding, why do we prefer to use the C API? Is this likely to improve performance? |
@TomAugspurger Correct! This is because when we use I have made POC so you could see to diffs: Both are doing the exact same thing, only that the C-API |
@@ -4,7 +4,6 @@ import time | |||
import locale | |||
import calendar | |||
import re | |||
import datetime |
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.
I think can just cimport cpython.datetime as datetime to minimize changes no? Didn't we move away from the import pattern here already in #32459
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.
Good catch!
Somehow slipped away from me
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 @MomIsBestFriend |
black pandas
git diff upstream/master -u -- "*.py" | flake8 --diff