[issue40137] TODO list when PEP 573 "Module State Access from C Extension Methods" will be implemented
Raymond Hettinger
report at bugs.python.org
Sun Apr 11 01:08:39 EDT 2021
Raymond Hettinger <raymond.hettinger at gmail.com> added the comment:
FWIW, I've only looked at the lru_cache() code. Someone should go through all the PyModule_GetState calls to see if they are on a critical path. AFAICT a huge number of these changes were applied without regard to whether or not they occurred on an existing fast path.
This is a considerable number of clock cycles for a type lookup that used to be almost cost free. Whether it is high or low impact greatly depends on whether the surrounding code was doing a lot of work or very little work. In thin functions, the incremental costs will be higher.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue40137>
_______________________________________
More information about the Python-bugs-list
mailing list