@ilovezfs Plot twist: this PR can be reopened. The problematic commit is precisely https://github.com/python/cpython/commit/2c992a0788536087bfd78da8f2c62b30a461d7e2:
```
commit 2c992a0788536087bfd78da8f2c62b30a461d7e2
Author: Benjamin Peterson <[email protected]>
Date: Thu May 28 12:45:31 2015 -0500
backport computed gotos (#4753)
```
```console
$ /tmp/python-build/78ba242403/bin/python /tmp/test.py
1.864752
$ /tmp/python-build/2c992a0788/bin/python /tmp/test.py
7.906417
```
Turns out Apple made the "right" choice sticking to 2.7.10; the performance hit started in 2.7.11.
Also, there might be clues in [1]; I just don't have time to check lately.
[1] https://opensource.apple.com/source/python/python-109/
By the way, here's the compiler version used to compile system Python (not sure if that clang is some experimental build):
```console
$ /usr/bin/python -c 'import sys; print(sys.version)'
2.7.10 (default, Jul 15 2017, 17:16:57)
[GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.31)]
```
I'll try to run systematic benchmarks tonight (going to take hours).