[arch-general] Fedora Speeds Up Python 3.

Chris Billington chrisjbillington at gmail.com
Tue Nov 26 14:31:47 UTC 2019

Ah, that's interesting.

I thought that would break my GIL profiling project that uses LD_PRELOAD
(shameless plug: https://github.com/chrisjbillington/gil_load), but since I
think I'm only overriding libc functions, it should be fine.

I'm sure there are other things it will break (I could have overridden
libpython functions instead - I wonder why I didn't, it seems simpler but
there was probably a reason), but if someone wants to use code that hacks
on the interpreter itself, having to install a custom python to do so is
not so unreasonable. Those speedups are nothing to scoff at.


On Tue, Nov 26, 2019 at 5:07 AM Ralph Corderoy <ralph at inputplus.co.uk>

> Hi,
> I thought this might be of interest.
> https://fedoraproject.org/wiki/Changes/PythonNoSemanticInterpositionSpeedup
> By building with -fno-semantic-interposition they remove the PLT that
> provides a level of indirection when calling a libpython function.
> libpython often calls itself and the PLT adds L1-cache pressure plus
> prevents inlining.  Gives gains of 25% on some workloads.
> --
> Cheers, Ralph.

More information about the arch-general mailing list