-
-
Notifications
You must be signed in to change notification settings - Fork 32k
[3.12] gh-112919: Speed-up datetime, date and time.replace() (GH-112921) #115344
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
…ythonGH-112921) Use argument clinic and call new_* functions directly. This speeds up these functions 6x to 7.5x when calling with keyword arguments. (cherry picked from commit 1f515e8) Co-authored-by: Eugene Toder <eltoder@users.noreply.github.com>
Hi @Yhg1s, This PR is a backport from main. It's a simple change that gives a nice speedup, but the main goal is to make the backport of the bug-fix #114780 easier. If we backport this, the change for #114780 should apply cleanly without manual edits. This PR fails the ABI change check in CI, but it seems to be a false positive. (It just adds a few string constants.) @ericsnowcurrently says that this is OK to do in bugfix releases, but the decision is up to you. Please let me know if we can backport this change or if I should write a separate version of #114780 for 3.12. Thank you. |
"Check if the ABI has changed" is failing on the CI:
|
@hugovk I am curious what is pending? The generated file has 7 conflicts like
These seem easy enough to fix (keep backport?) and I could do that, but I assumed that generated files are not checked in. |
Most generated files are not checked in, but a handful are. Several things pending:
|
3.12 is entering security-only fixes mode today. Seems to me like this performance fix shouldn't go to 3.12 anyway. |
Use argument clinic and call new_* functions directly. This speeds up
these functions 6x to 7.5x when calling with keyword arguments.
(cherry picked from commit 1f515e8)
Co-authored-by: Eugene Toder eltoder@users.noreply.github.com