gh-99254: remove all unused consts from code objects#99255
gh-99254: remove all unused consts from code objects#99255iritkatriel merged 19 commits intopython:mainfrom
Conversation
|
🤖 New build scheduled with the buildbot fleet by @iritkatriel for commit a9f38fd 🤖 If you want to schedule another build, you need to add the ":hammer: test-with-buildbots" label again. |
Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
sweeneyde
left a comment
There was a problem hiding this comment.
The code looks good to me. A couple of little things, but they could go either way.
|
Unfortunately, I can reproduce the Windows failures locally. I get a segfault when DetailsMaybe the |
I think it is before - extended args are added in assemble_emit. |
But jump distances are computed in |
Misc/NEWS.d/next/Core and Builtins/2022-11-08-17-47-10.gh-issue-99254.RSvyFt.rst
Outdated
Show resolved
Hide resolved
|
When you're done making the requested changes, leave the comment: |
Ah right, there's a comment about this in the code. |
|
Ok, that fixed it. I wonder why it only showed up on windows. |
I bet the startup sequence contains quite a bit of Windows-specific code. Probably just a really lucky/unlucky code path. |
…e-99254.RSvyFt.rst Co-authored-by: Brandt Bucher <brandtbucher@gmail.com>
|
I have made the requested changes; please review again. |
|
Thanks for making the requested changes! @sweeneyde, @brandtbucher: please review the changes made to this pull request. |
|
🤖 New build scheduled with the buildbot fleet by @iritkatriel for commit 02b68e0 🤖 If you want to schedule another build, you need to add the ":hammer: test-with-buildbots" label again. |
|
Thanks for the reviews and debugging help. |
This reduces the total size of unused consts in the top 100 PyPl packages by about 2%:
Before:
Total: 75 errors; 9,946 files; 235,684 code objects; 3,669,436 lines; 31,309,347 opcodes; 31,073,663 opcode pairs; 12,916,440.0 cache_size; 9,198,802.0 cache wasted; 1,858,819 ops quickened; 44,504 prev extended args; 1,509,350 total size of co_consts; 189,300 number of co_consts
After:
Total: 75 errors; 9,946 files; 235,684 code objects; 3,669,436 lines; 31,307,877 opcodes; 31,072,193 opcode pairs; 12,915,869.0 cache_size; 9,198,231.0 cache wasted; 1,858,819 ops quickened; 43,034 prev extended args; 1,477,889 total size of co_consts; 189,286 number of co_consts