[issue42202] Optimize function annotation

Mark Shannon report at bugs.python.org
Tue Nov 17 10:43:31 EST 2020


Mark Shannon <mark at hotpy.org> added the comment:

For top level functions (functions created once) this isn't going to make any real difference. There might be a small speedup for function creation, but it isn't going to be measurable.

For nested functions with annotations, where many functions are created from a single code object, this could be worthwhile.

However, before we add yet another attribute to code objects, I'd like to see some evidence of a speedup.

----------
nosy: +Mark.Shannon

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


More information about the Python-bugs-list mailing list