-
-
Notifications
You must be signed in to change notification settings - Fork 32.2k
bpo-27987: pymalloc: align by 16bytes on 64bit platform #12850
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
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.
Any idea of the impact on memory consumption?
Misc/NEWS.d/next/Core and Builtins/2019-04-16-11-52-21.bpo-27987.n2_DcQ.rst
Outdated
Show resolved
Hide resolved
Typically, tuples and strs are dominants about number of objects. In case of str, I expect 50+% of the objects are In case of tuples, roughly +8 bytes for 1/2 of tuples. But please note I have removed 8bytes from GC Header in Python 3.8. When comparing to Python 3.7, -8 bytes for 1/2 of tuples. |
Ok, but would it be possible to measure the "real" memory usage of a Python program? For example, run "./python -i -m test test_os" and then run:
I'm curious to know if we can see this memory footprint increase for real, not just in theory :-) |
master:
align-16byte:
About 4% increase in this case.
No visible impact about VmPeak. |
Also, can you run the benchmark suite? |
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.
+1 on the principle.
I post the result on bpo issue. |
Thanks @methane for the PR 🌮🎉.. I'm working now to backport this PR to: 3.7. |
(cherry picked from commit f0be4bb) Co-authored-by: Inada Naoki <songofacandy@gmail.com>
GH-13318 is a backport of this pull request to the 3.7 branch. |
Thanks @methane for the PR 🌮🎉.. I'm working now to backport this PR to: 2.7. |
Sorry, @methane, I could not cleanly backport this to |
GH-13319 is a backport of this pull request to the 2.7 branch. |
https://bugs.python.org/issue27987