Repository navigation
Regression in the AC generated code #91583
Description
Activity
- addedperformancePerformance or resource usagePerformance or resource usage3.11only security fixesonly security fixes
on Apr 15, 2022 Did you benchmark the difference?
No, but
_PyArg_ParseStackAndKeywordsadds some overhead, and I do not see reason of not using more efficient code here. It seems that adding the implicitclsparameter broke some checks in Argument Clinic. These checks should ignore that parameter (as they ignoreself), it does not affect the parsing code.I do not see reason of not using more efficient code here
+1
It seems that adding the implicit cls parameter broke some checks in Argument Clinic. These checks should ignore that parameter (as they ignore self), it does not affect the parsing code.
In sqlite3, for the sqlite3.Connection class, I store a pointer to the module state in the class context. A module state lookup in any of the connection methods is simply a class context member lookup. We could do a similar optimisation here.
METH_METHODwas introduced in 3.9, and Argument Clinic support was added at the same time.- added 3 commits that reference this issue
on Apr 30, 2022
Argument Clinic now generates less efficient code using
_PyArg_ParseStackAndKeywordsinstead of_PyArg_UnpackKeywords. It is a regression introduced after establishing module state. For example see #23393. It may be a cause of #91404.@erlend-aasland