On 2019-07-09, Inada Naoki wrote: > So I tried to use LIKELY/UNLIKELY macro to teach compiler hot part. > But I need to use > "static inline" for pymalloc_alloc and pymalloc_free yet [1].
I think LIKELY/UNLIKELY is not helpful if you compile with LTO/PGO enabled. So, I would try that first. Also, if you use relatively small static functions that are defined before use (no forward declarations), I have found that GCC is usually smart about inlining them. So, I don't think you should have to use "static inline" rather than just "static". Good work looking into this. Should be some relatively easy performance win. Cheers, Neil _______________________________________________ Python-Dev mailing list -- python-dev@python.org To unsubscribe send an email to python-dev-le...@python.org https://mail.python.org/mailman3/lists/python-dev.python.org/ Message archived at https://mail.python.org/archives/list/python-dev@python.org/message/TISXQ7E3AA5BPMVPTDWKDWBKV5VPVOTI/