I close the issue, it seems like all subtasks have been completed.
Summary of the issue:
* The following macros have been converted to static inline functions:
- Py_INCREF(), Py_DECREF()
- Py_XINCREF(), Py_XDECREF()
- PyObject_INIT(), PyObject_INIT_VAR()
- _Py_NewReference(), _Py_ForgetReference()
- _Py_Dealloc()
- _PyObject_GC_TRACK(), _PyObject_GC_UNTRACK()
* There is no significant impact on performance:
* I ran performance benchmark on Python compiled in release mode
* I ran the Python test suite on Python compiled in debug mode
* I measured the compilation time in release an debug mode
* It has been decided to use "static inline" to declare inline function (write directly "static inline", no macro).
* It has been decided to no use __attribute__((always_inline)) nor __forceinline (ask the compiler to always inline).
--
Benjamin Peterson would "like to see Py_LOCAL_INLINE removed, too, fwiw", but it's part of the public C API. It would require a deprecation period. I'm not interested to touch the public C API.
Benjamin: please open a new issue if you still want to remove it :-) |