[Python-Dev] Re: Optimizing pymalloc (was obmalloc

2019年7月09日 15:19:31 -0700

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 -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/[email protected]/message/TISXQ7E3AA5BPMVPTDWKDWBKV5VPVOTI/

Reply via email to