Message340330
> In 3.8, the union used to ensure alignment on a C double is gone.
Note that two uintptr_t is aligned 16bytes on 64bit platforms and 8bytes on 32bit platforms.
Python 3.7 is worse than 3.8.
It used "double dummy" to align by 8 bytes, not 16 bytes.
We should use "long double" to align by 16 bytes.
https://software.intel.com/sites/default/files/article/402129/mpx-linux64-abi.pdf
But it means +8 bytes for all tuples. If we backport PR-12850 to 3.7, +8 bytes for 1/2 tuples, and +16 bytes for remaining tuples.
Any ideas about reduce impact for Python 3.7?
For example, can we add 8byte dummy to PyGC_Head, and tuple use the dummy for hash? Maybe, it breaks ABI.... Not a chance...
I wonder if we can add -fmax-type-align=8 for extension types... |
|
Date |
User |
Action |
Args |
2019-04-16 10:14:54 | methane | set | recipients:
+ methane, twouters, nascheme, gregory.p.smith, pitrou, vstinner, benjamin.peterson, skrah, fweimer, tgrigg |
2019-04-16 10:14:54 | methane | set | messageid: <1555409694.37.0.933110224573.issue27987@roundup.psfhosted.org> |
2019-04-16 10:14:54 | methane | link | issue27987 messages |
2019-04-16 10:14:54 | methane | create | |
|