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 kj
Recipients Mark.Shannon, barry, brandtbucher, kj
Date 2022-01-28.11:00:26
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1643367626.62.0.525331320634.issue46528@roundup.psfhosted.org>
In-reply-to
Content
> IIRC, Carl got a lot of benefit out of reordering the opcodes in the main loop to put the most common ones at the top.  I don't know if that is still relevant or whether computed gotos, when enabled, change that calculus.

AFAIK, on nix systems with PGO, the order doesn't matter. Brandt did some interesting research on this earlier https://github.com/faster-cpython/ideas/issues/96.

On Windows, it might be a different story. There are reports of up to 5% speedups in pyperformance just by moving LOAD_FAST and LOAD_GLOBAL out of the loop (to the top).  See the last few messages in https://bugs.python.org/issue45116. I've heard from some people that MSVC's PGO doesn't deal with gigantic switch-case statements very well, though I can't confirm the veracity of that info.
History
Date User Action Args
2022-01-28 11:00:26kjsetrecipients: + kj, barry, Mark.Shannon, brandtbucher
2022-01-28 11:00:26kjsetmessageid: <1643367626.62.0.525331320634.issue46528@roundup.psfhosted.org>
2022-01-28 11:00:26kjlinkissue46528 messages
2022-01-28 11:00:26kjcreate