This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients Mark.Shannon, kj, lemburg, malin, neonene, pablogsal, paul.moore, rhettinger, steve.dower, tim.golden, vstinner, zach.ware
Date 2021-09-17.18:32:03
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1631903523.5.0.537969440919.issue45116@roundup.psfhosted.org>
In-reply-to
Content
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.
History
Date User Action Args
2021-09-17 18:32:03vstinnersetrecipients: + vstinner, lemburg, rhettinger, paul.moore, tim.golden, Mark.Shannon, zach.ware, steve.dower, malin, pablogsal, neonene, kj
2021-09-17 18:32:03vstinnersetmessageid: <1631903523.5.0.537969440919.issue45116@roundup.psfhosted.org>
2021-09-17 18:32:03vstinnerlinkissue45116 messages
2021-09-17 18:32:03vstinnercreate