Raymond Hettinger <[email protected]> added the comment:
Here are some quick measurements on a single module¹ that uses typing. It shows
about a 7% space savings between the baseline and patched versions:
-rw-r--r-- 1 raymond staff 3490 Mar 31 15:07 kmeans.cpython-38.opt-2.pyc
-rw-r--r-- 1 raymond staff 3245 Mar 31 15:10 kmeans.cpython-38.opt-2.pyc
Since unique types are singletons, the savings will likely be much less on
bigger modules where the same types are used over and over again in the
signatures:
>>> List[int] is List[int]
True
It would be nice if someone could measure the effect on a big project. It's
possible that the benefits are negligible compared the savings from docstrings.
¹ https://raw.githubusercontent.com/rhettinger/modernpython/master/kmeans.py
----------
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue36466>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com