This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Use _PyArg_Parser for _PyArg_ParseStack(): support positional only arguments
Type: performance Stage: resolved
Components: Interpreter Core Versions: Python 3.7
process
Status: closed Resolution: out of date
Dependencies: Superseder:
Assigned To: Nosy List: methane, serhiy.storchaka, vstinner
Priority: normal Keywords:

Created on 2017-02-05 10:09 by vstinner, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Messages (2)
msg287043 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2017-02-05 10:09
Serhiy Storshaka wrote a kind of cache for PyArg_ParseTupleAndKeywords(): _PyArg_Parser structure used by _PyArg_ParseTupleAndKeywordsFast(). It makes argument parser much faster.

Would it be possible to modify it to be able to use it in _PyArg_ParseStack(). (Would it be faster?)

See also issue #29419 "Argument Clinic: inline PyArg_UnpackTuple and PyArg_ParseStack(AndKeyword)?" for a different kind of optimization.
msg287045 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2017-02-05 10:39
I don't think it would be faster.

But it is possible to get rid of some code duplication at the cost of making it slower.
History
Date User Action Args
2022-04-11 14:58:42adminsetgithub: 73637
2018-09-19 23:12:40vstinnersetstatus: open -> closed
resolution: out of date
stage: resolved
2017-02-05 10:39:10serhiy.storchakasetmessages: + msg287045
2017-02-05 10:09:13vstinnercreate