STINNER Victor <vstin...@python.org> added the comment:

Pablo:
> I have seen people using LD_PRELOAD (...) to interpose faster versions of 
> some functions or to collect metrics (although there are better ways).

IMHO if someone has to go so far into "hacking" Python, they should recompile 
Python with specific options. I'm not sure that using LD_PRELOAD to get "faster 
versions of some functions" is the best approach in term of performance, but I 
expect it to be convenient :-)


Charalampos:
> I think it will add to the complexity of the --with-optimizations flag which 
> already implies PGO and LTO.

It doesn't enable LTO, only PGO :-) We had to disable LTO because of multiple 
compiler bugs last years.


Serhiy:
> I am sure some C API functions are purposed to be overridden.

Is it a theorical use case, or are you aware of such use case being currently 
used in the wild?


Ammar Askar:
> Just for a quick datapoint: llvm/clang do this by default and you need an 
> explicit `-fsemantic-interposition` to disable it 
> http://lists.llvm.org/pipermail/llvm-dev/2016-November/107625.html

Oh, that's really interesting, thanks!

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue38980>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to