FS#65151 - [python] Add -fno-semantic-interposition to {C,LD}FLAGS for a speedup

Attached to Project: Arch Linux
Opened by hexchain (hexchain) - Wednesday, 15 January 2020, 18:58 GMT
Last edited by Felix Yan (felixonmars) - Wednesday, 22 January 2020, 09:09 GMT
Task Type Feature Request
Category Packages: Extra
Status Closed
Assigned To Felix Yan (felixonmars)
Architecture x86_64
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

Description:

Fedora proposal: https://fedoraproject.org/wiki/Changes/PythonNoSemanticInterpositionSpeedup

I've tried adding the flag in the current python PKGBUILD[1] and it indeed yields a ~20% (roughly by looking at the table) speedup, according to the same pyperformance test that Fedora used. The only downside, however, may be that certain symbols are no longer LD_PRELOAD-able because they are inlined.

See [2] for my results, done on a t3a.xlarge EC2 instance. The "repo.json" column corresponds to results with the repository python and "flag.json" to results with the python package compiled with that flag.

Original data is at [3] in case anyone would like to verify the result.


Additional info:
* package version(s)
python 3.8.1-3

[1] https://paste.xinu.at/KBfU/
[2] http://fars.ee/uhd4
[3] https://paste.xinu.at/m-ZkJ5Ve/
This task depends upon

Closed by  Felix Yan (felixonmars)
Wednesday, 22 January 2020, 09:09 GMT
Reason for closing:  Implemented
Additional comments about closing:  python-3.8.1-4
Comment by Eli Schwartz (eschwartz) - Wednesday, 15 January 2020, 19:56 GMT
https://bugs.python.org/issue38980 ponders making this a (default-enabled?) option in the python build system.
Comment by hexchain (hexchain) - Thursday, 16 January 2020, 19:42 GMT
Should we wait for the upstream then? Looks like they are deciding which config option should this flag be put behind.

Fedora has already implemented this, and IMO adding an optimization flag (that upstream already greenlit) should not be against our rules?

Loading...