![](https://secure.gravatar.com/avatar/be200d614c47b5a4dbb6be867080e835.jpg?s=120&d=mm&r=g)
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)?
Historically, reference counting has been highly performance sensitive, and I don't think we should start regressing performance until we have the full picture of how the changes will enable performance improvements.
(I'm still of the opinion that we need to replace the entire C API to be able to enable better performance, but I'm not going to block innocuous cleanups and refactorings that help improve the current one, provided they aren't regressions.)
Cheers, Steve