Message358684
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! |
|
Date |
User |
Action |
Args |
2019-12-19 15:15:21 | vstinner | set | recipients:
+ vstinner, methane, serhiy.storchaka, cstratak, ammar2, hroncok, pablogsal |
2019-12-19 15:15:21 | vstinner | set | messageid: <1576768521.61.0.0858417845046.issue38980@roundup.psfhosted.org> |
2019-12-19 15:15:21 | vstinner | link | issue38980 messages |
2019-12-19 15:15:21 | vstinner | create | |
|