INADA Naoki <songofaca...@gmail.com> added the comment: I don't know exactly. But as far as I saw, Python 3's eval loop has less function-wide local variables.
For example, ROT_THREE uses only block local variable. https://github.com/python/cpython/blob/a48e78a0b7761dd74f1d03fc69e0f6caa6f02fe6/Python/ceval.c#L1109-L1111 On the other hand, there are more function-wide local variables in Python 2. And some of them are used over `case`s actually. https://github.com/python/cpython/blob/672fd7d8162f76aff8423fa5c7bfd2b1e91faf57/Python/ceval.c#L802-L807 I suspect that's why LLVM4 failed to optimize Python 2 but success to optimize Python 3. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue32616> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com