[issue42217] compiler: merge co_code and co_lnotab

2021-02-09 Thread Inada Naoki
Inada Naoki added the comment: New changeset bdb941be423bde8b02a5695ccf51c303d6204bed by Inada Naoki in branch 'master': bpo-42217: compiler: merge same co_code and co_linetable objects (GH-23056) https://github.com/python/cpython/commit/bdb941be423bde8b02a5695ccf51c303d6204bed --

[issue42217] compiler: merge co_code and co_lnotab

2021-02-09 Thread Inada Naoki
Change by Inada Naoki : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___ P

[issue42217] compiler: merge co_code and co_lnotab

2020-10-31 Thread Inada Naoki
Inada Naoki added the comment: @Serhiy > Do you mean sharing values of co_code and co_lnotab between code objects of > the same module? Yes. > How much memory does this save (in absolute and relative value)? Maybe 1~3%, but I am not sure. I am more interested in reducing number of object

[issue42217] compiler: merge co_code and co_lnotab

2020-10-31 Thread Mark Shannon
Mark Shannon added the comment: PEP 626 has just been accepted. Could you please leave this until I have merged in the implementation of PEP 626 which uses a different line number table format -- nosy: +Mark.Shannon ___ Python tracker

[issue42217] compiler: merge co_code and co_lnotab

2020-10-31 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Do you mean sharing values of co_code and co_lnotab between code objects of the same module? How much memory does this save (in absolute and relative value)? Which functions have the same co_code? -- nosy: +serhiy.storchaka __

[issue42217] compiler: merge co_code and co_lnotab

2020-10-31 Thread Inada Naoki
Change by Inada Naoki : -- keywords: +patch pull_requests: +21975 stage: -> patch review pull_request: https://github.com/python/cpython/pull/23056 ___ Python tracker ___

[issue42217] compiler: merge co_code and co_lnotab

2020-10-31 Thread Inada Naoki
New submission from Inada Naoki : co_consts are merged already, but I forget about code attributes other than co_consts. Duplication ratio is vary by code style, but in case of logging, we can reduce 25% of them. ``` >>> data = open('Lib/logging/__pycache__/__init__.python-310.pyc', 'rb').rea