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.

Author rhettinger
Recipients cary, gvanrossum, levkivskyi, rhettinger
Date 2019-03-31.22:23:24
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1554071005.02.0.499663565975.issue36466@roundup.psfhosted.org>
In-reply-to
Content
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
History
Date User Action Args
2019-03-31 22:23:25rhettingersetrecipients: + rhettinger, gvanrossum, levkivskyi, cary
2019-03-31 22:23:25rhettingersetmessageid: <1554071005.02.0.499663565975.issue36466@roundup.psfhosted.org>
2019-03-31 22:23:25rhettingerlinkissue36466 messages
2019-03-31 22:23:24rhettingercreate