Le 08/11/2018 à 21:21, Steve Dower a écrit :
On 08Nov2018 1046, Antoine Pitrou wrote:
Le 08/11/2018 à 19:33, Steve Dower a écrit :
On 06Nov2018 1322, Victor Stinner wrote:
I also started to use replace macros with static inline functions:
Convert Py_INCREF() and PyObject_INIT() to inlined functions https://bugs.python.org/issue35059
Have we verified that all our main compilers do in fact inline these all the time? Including when run in C++ mode (when people build C++ extension modules using our headers)?
This is 2018, so I think we should assume decent compilers which /do/ inline tiny functions explicitly marked "inline". At least with optimizations enabled... Debug mode performance might be hindered, though.
And clearly we did assume that, but can we check it as well? Not a big ask.
I suppose people can run benchmarks on their configurations of choice ;-)
Regards
Antoine.