[issue36521] Consider removing docstrings from co_consts in code objects

Serhiy Storchaka report at bugs.python.org
Sat Oct 2 05:54:53 EDT 2021


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:

I propose an opposite change -- take data known at compile time (name, qualname and annotations). It will make the code for creating new function smaller and faster. It is what we want to achieve -- reducing import time, but additionally it will reduce time of creating local functions.

Arguments for saving few bytes do not look convincing to me. It is why we use caches -- memory is cheaper than the CPU time. And in most cases there is no any saving.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue36521>
_______________________________________


More information about the Python-bugs-list mailing list