[issue34100] Same constants in tuples are not merged while compile()

INADA Naoki report at bugs.python.org
Thu Jul 19 05:32:05 EDT 2018


INADA Naoki <songofacandy at gmail.com> added the comment:

Counting object types in logging/__pycache__/__init__.cpython-38.pyc:

master:
[('r', 1815), (')', 467), ('Z', 339), ('s', 314), ('z', 273), ('c', 157), ('N', 154), ('a', 24), ('F', 14), ('i', 11), ('T', 8)]

GH-8341:
[('r', 1737), (')', 375), ('Z', 339), ('s', 314), ('z', 264), ('c', 157), ('N', 138), ('a', 24), ('F', 14), ('i', 11), ('T', 8)]

It reduced about 5% objects.

I chose logging/__init__ because it's large except tests, and it's written in OO-based. (Large application has many OO-based code).

----------
keywords:  -patch
stage: patch review -> needs patch

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


More information about the Python-bugs-list mailing list