New submission from STINNER Victor <vstin...@python.org>:
In bpo-35059, I converted Py_DECREF() macro to a static inline function (commit 2aaf0c12041bcaadd7f2cc5a54450eefd7a6ff12). Then in bpo-35134, I moved _Py_Dealloc() macro to the newly created Include/cpython/object.h header file (commit 6eb996685e25c09499858bee4be258776e603c6f). The problem is that when Py_DECREF() was converted to a static inline function, it stopped to use the *redefine* _Py_Dealloc() fast macro, but instead use the slow regular function call: PyAPI_FUNC(void) _Py_Dealloc(PyObject *); Py_DECREF() performance is critical for overall Python performance. I will work on a PR to fix this issue. See also bpo-39542 which updates object.h and cpython/object.h. ---------- components: C API messages: 361310 nosy: vstinner priority: normal severity: normal status: open title: Py_DECREF(): use inlined _Py_Dealloc() versions: Python 3.8, Python 3.9 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue39543> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com