gh-91719: Reload opcode on unknown error so that C can optimize the dispatching in ceval.c#94364
gh-91719: Reload opcode on unknown error so that C can optimize the dispatching in ceval.c#94364gvanrossum merged 9 commits intopython:mainfrom neonene:evalswitch
Conversation
|
My reports were based on fda4b2f (2022-06-22). 3.12 tip has reduced one stack access on PGO and Release(Ob3 only). With this patch, another access disappears. 3.11 seems a bit different on Ob3. I'm re-investigating 3.11 PGO now. |
|
Okay, I'll wait before approving and merging. |
|
PS. You need a news blurb. |
|
We're all good except the news blurb. If you can't handle the tooling for that (just click on "Details" for the failing test) let me know and I'll make something up. Then we will land. This is now a 3.11 release blocker. |
|
3.12a0+ (2022-6-27 edb10ca) PGO |
|
3.11b3+ (2022-6-29 a548a45) PGO |
|
Thanks @neonene for the PR, and @gvanrossum for merging it 🌮🎉.. I'm working now to backport this PR to: 3.11. |
… the dispatching in ceval.c (pythonGH-94364) (cherry picked from commit ea39b77) Co-authored-by: neonene <53406459+neonene@users.noreply.github.com>
|
GH-94453 is a backport of this pull request to the 3.11 branch. |
|
Thanks for reviewing and merging. |
… the dispatching in ceval.c (python#94364)
This patch helps MSVC to optimize the switch code in
_PyEval_EvalFrameDefault(), making the situation in which only the dispatcher reads the givenopcodevariable on non-debug builds.Currently, each case loads an opcode from other places when needed, except
unknown opcodecase.faster-cpython/ideas#422