-
-
Notifications
You must be signed in to change notification settings - Fork 32k
bpo-37207: Use PEP 590 vectorcall to speed up set() #19019
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
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.
When doing benchmarks, you can use two Python binaries and use pyperf timeit --compare-to=REF_PYTHON_BINARY (...)
. It checks that the difference is significant.
https://pyperf.readthedocs.io/en/latest/cli.html#pyperf-timeit
Or you can store results in JSON files and use pyperf compare_to
command.
I merged PR #18980, please rebase your PR on top of master and modify your PR to use _PyArg_NoKwnames(). |
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.
IMHO it's worth it to add a few lines of C code to make tuple() and set() constructors faster. |
Yeah, I think the PEP 590 implemented very well to bring performance enhancement very easily. |
What I mean is that vectorcall should not be used for everything. But set() and tuple() are very commonly used, so here it's worth it. |
PEP 590
Master
https://bugs.python.org/issue37207