Browse Source
bpo-34100: Merge constants recursively (GH-8341)
bpo-34100: Merge constants recursively (GH-8341)
There are some same consts in a module. This commit merges them into single instance. It reduces number of objects in memory after loading modules. https://bugs.python.org/issue34100pull/10719/head
committed by
Miss Islington (bot)
6 changed files with 4692 additions and 4594 deletions
-
10Lib/test/test_compile.py
-
2Misc/NEWS.d/next/Core and Builtins/2018-07-27-20-04-52.bpo-34100.ypJQX1.rst
-
169Python/compile.c
-
2985Python/importlib.h
-
4560Python/importlib_external.h
-
1560Python/importlib_zipimport.h
@ -0,0 +1,2 @@ |
|||
Compiler now merges constants in tuples and frozensets recursively. Code |
|||
attributes like ``co_names`` are merged too. |
|||
2985
Python/importlib.h
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
4560
Python/importlib_external.h
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
1560
Python/importlib_zipimport.h
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
Write
Preview
Loading…
Cancel
Save
Reference in new issue