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-41835: Speedup to dict vectorcall with keyword arguments. #22346
Conversation
Do you have a microbenchmark for what specific thing is being optimized? I'd recommend using pyperf and posting the results to an issue at bugs.python.org. From the Dev Guide:
It seems like most of the diff is filled with these. I think the general guideline is to keep the diff as small as possible. I would think that the PR should limit changing cosmetics ( Is there anything positive accomplished by moving behavior from public functions like |
@sweeneyde: I removed all the minor and cosmetic changes. About PyDict_SetItem and the other one, I followed the example of setobject.c, where all the public functions calls the static internal functions. IMHO it's more clear. Furthermore, should it save you some nanoseconds (static objects are allocated in the stack)? |
@Marco-Sulla Please create bpo issue and post benchmark&result to it. |
@methane I already created it: https://bugs.python.org/issue41835 |
I added a specialized version of insertdict, insertdict_init, that assumes any needed resize to the dict is done before the inserting.
Also done some minor and cosmetic change.
https://bugs.python.org/issue41835