Ken Jin <kenjin4...@gmail.com> added the comment:
> 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. ---------- nosy: +kj _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue46528> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com