On Windows, a Debug build doesn't inline Py_INCREF/DECREF even if it uses __forceinline. I looked at the Py_IncRef() and Py_DecRef() assembly in Visual Studio using a breakpoint.
Using /Ob1, Py_INCREF/DECREF are inlined as expected. I set this option in the pythoncore project.
Do you think that I should modify the 38 other projects of the pcbuild solution to enable /Ob1 in debug build?
Documentations.
Inline Functions (C++):
https://docs.microsoft.com/en-us/cpp/cpp/inline-functions-cpp?view=vs-2017
-Od: disable optimization ("d" stands for Debug)
https://msdn.microsoft.com/en-us/library/aafb762y.aspx
/Ob (Inline Function Expansion):
https://msdn.microsoft.com/en-us/library/47238hez.aspx |