-
-
Notifications
You must be signed in to change notification settings - Fork 32.1k
bpo-37942: Improve argument clinic float converter #15470
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
bpo-37942: Improve argument clinic float converter #15470
Conversation
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.
Do you want to add the same optimization in getargs.c
?
Baseline timing: ./python.exe -m timeit -r11 -s 'from statistics import _normal_dist_inv_cdf as f' -s 't=0.75,0.0,1.0' 'f(*t)' 5000000 loops, best of 11: 61.1 nsec per loop Improved timing: ./python.exe -m timeit -r11 -s 'from statistics import _normal_dist_inv_cdf as f' -s 't=0.75,0.0,1.0' 'f(*t)' 5000000 loops, best of 11: 52.5 nsec per loop
Serhiy, do you know how to regenerate or edit 'Lib/test/clinic.test' ? |
Thanks @rhettinger for the PR 🌮🎉.. I'm working now to backport this PR to: 3.8. |
Sorry, @rhettinger, I could not cleanly backport this to |
) (cherry picked from commit aef9ad8)
GH-15480 is a backport of this pull request to the 3.8 branch. |
I use the following line: mv Lib/test/clinic.test{,.c}; ./python Tools/clinic/clinic.py --force Lib/test/clinic.test.c; mv Lib/test/clinic.test{.c,} |
https://bugs.python.org/issue37942