#2290 F32 Self-Contained Change: Build Python with -fno-semantic-interposition for better performance
Closed: Accepted 4 years ago by ignatenkobrain. Opened 4 years ago by bcotton.

We add the -fno-semantic-interposition compiler/linker flag when building Python interpreters, as it provides significant performance improvement, up to 27% depending on the workload. Users will no longer be able to use LD_PRELOAD to override a symbol from libpython, which we consider a good trade off for the speedup.


APPROVED via the fast track with +7,0,-0

Thanks.

Metadata Update from @churchyard:
- Issue tagged with: pending announcement

4 years ago

I abstain; that coul be a major drawback for some people.

Metadata Update from @psabata:
- Issue untagged with: pending announcement

4 years ago

@psabata What drawback? Not being able to use LD_PRELOAD to override a symbol from libpython? We are happy to direct such users to some alternatives, such as those for memory allocations:

https://www.python.org/dev/peps/pep-0454/
https://www.python.org/dev/peps/pep-0445/

Users who actually need to use LD_PRELOAD for a symbol from libpython are expected to be hacking on Python itself and hence are very likely building their own Python anyway.

Metadata Update from @churchyard:
- Issue tagged with: pending announcement

4 years ago

I abstain; that coul be a major drawback for some people.

Would it be possible to expand on that? Do you refer specifically to the inability to override symbols?

Metadata Update from @churchyard:
- Issue tagged with: F32, self contained change

4 years ago

FYI since the change has been approved in Fedora, I also proposed to make the change directly in Python upstream: https://bugs.python.org/issue38980

Metadata Update from @ignatenkobrain:
- Issue close_status updated to: Accepted
- Issue status updated to: Closed (was: Open)

4 years ago

Metadata Update from @bcotton:
- Issue untagged with: F32
- Issue set to the milestone: Fedora 32

3 years ago

Log in to comment on this ticket.

Metadata