STINNER Victor <vstin...@python.org> added the comment:

Raymond: "Please do as Steve asked  and revert back to the previous stable, 
reliable code."

Is this issue really about Py_INCREF() being a static inline macro? Or is it 
more about the increased size of the _PyEval_EvalFrameDefault() function?

neonene's analyzis seems to show that the the PGO optimizer of the MSC compiler 
has thresholds depending on the function size, and _PyEval_EvalFrameDefault() 
crossed these thresholds. Py_INCREF() static inline function only seems to be 
the top of the iceberg, it's more a "side effect" than the root issue, no?

neonene showed in msg401743 that even adding *dead code* changes Python 
performance. So for me, it sounds weird to decide to change Py_INCREF() 
implementation only based on this analysis. Or maybe I missed something.

neonene's analyzis starts with the commit 
28d28e053db6b69d91c2dfd579207cd8ccbc39e7 of PR 25244. Are you suggesting to 
revert this change? Mark Shannon is pushing many changes in ceval.c and the 
frame object. Multiple changes have been pushed on top of it since this commit, 
I don't think that this commit can be easily reverted.

What I understood is that adding __forceinline on some static inline functions 
can make the performance regression of the commit 
28d28e053db6b69d91c2dfd579207cd8ccbc39e7 less bad. But I would prefer to 
validate that, since neonene's comparisons are not what I'm looking for: 
compare main to main+Py_ALWAYS_INLINE.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue45116>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to