Bug 1749479 - Build Python3 to statically link with libpython*.a for better performance
Summary: Build Python3 to statically link with libpython*.a for better performance
Keywords:
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: python3
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Charalampos Stratakis
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-09-05 17:44 UTC by dagray
Modified: 2019-09-21 21:23 UTC (History)
11 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:


Attachments (Terms of Use)

Description dagray 2019-09-05 17:44:06 UTC
Fedora Python 3 performance could be improved by ~15% by building /usr/bin/python* to statically link with a libpython*.a rather than dynamically with libpython*.so. This can be done by removing --enable-shared from the configure arguments. The libpython*.so can be built separately and included in the rpm, or as a separate package.

The value of PGO and LTO is diminished significantly by using --enable-shared in the build.

PyBench and PyPerformance results both improved by about 15% on average in my experimental builds on Fedora.

PyBench results: (average)
Fedora 30 stock python3.6 : 2001 ms
Fedora 30 python3.6 build from src without --enable-shared: 1709

Comment 1 Miro Hrončok 2019-09-20 13:40:16 UTC
Experimental PR: https://src.fedoraproject.org/rpms/python3/pull-request/133


Note You need to log in before you can comment on or make changes to this bug.