-
-
Notifications
You must be signed in to change notification settings - Fork 31.9k
bpo-46429: Merge all deepfrozen files into one #30572
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
In the issue you claimed a 1.2 Mb space savings. How did you measure that? On MacOS I see ~0.2 Mb space savings (both size and ls show roughly this). |
Yes, it was 1.2 megabits not 1.2 megabytes, so around ~0.2 MB is correct. |
@gvanrossum What's next step for this PR, I mean do you think this would be merged or was this just for experimentation ? |
I still need to review it. Maybe @tiran could also have a look? |
If I understand the change correctly then we are no longer tracking dependencies correctly. Does a change to |
Yes, fixed now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Basics look good, I have some nits to pick. You can undraft this.
Hey Kumar, I wonder if (in a separate PR?) you'd be interested in implementing another idea to make the generated C code more understandable. For string constants, we could easily generate names that are more readable than |
Can you also open a bpo issue and add a news blurb? |
@gvanrossum I am interested, will create another PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just one request, fold the long line in the Windows project file.
Oh, there was one more request from the Faster CPython team. Could you run the PyPerformance benchmark (in PGO mode, on as quiet a machine as possible) before and after this to see if there's a net perf benefit? (We'd expect a small improvement due to the memory savings, but there could be a slight negative effect due to less memory locality.) |
With patch:
Without patch:
|
What benchmark did you run? Definitely not PyPerformance! |
Nope https://github.com/python/cpython/blob/main/Tools/scripts/startuptime.py I didn't see you asked for pyperformance (sorry). |
Yeah, I trust that the startup time is the same or better (actually the precision of that number is insufficient, we should print another digit), but we were wondering about effects on other benchmarks due to locality in deep-frozen modules. It's the only thing left to do here. |
Perhaps, you can verify it if you have a benchmark setup ? I don't expect any significant change but less memory use. |
Okay, I'm just going to merge. We can watch speed.python.org tomorrow. |
See discussion faster-cpython/ideas#218
https://bugs.python.org/issue46429