File tree Expand file tree Collapse file tree 2 files changed +12
-2
lines changed
Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change 1+ Disable computed gotos by default for clang < 5.0. It caused significant
2+ performance regression.
Original file line number Diff line number Diff line change @@ -689,11 +689,19 @@ PyObject *
689689PyEval_EvalFrameEx (PyFrameObject * f , int throwflag )
690690{
691691#ifdef DYNAMIC_EXECUTION_PROFILE
692- #undef USE_COMPUTED_GOTOS
692+ #undef USE_COMPUTED_GOTOS
693693#endif
694694#ifdef HAVE_COMPUTED_GOTOS
695695 #ifndef USE_COMPUTED_GOTOS
696- #define USE_COMPUTED_GOTOS 1
696+ #if defined(__clang__ ) && (__clang_major__ < 5 )
697+ /* Computed gotos caused significant performance regression
698+ * with clang < 5.0.
699+ * https://bugs.python.org/issue32616
700+ */
701+ #define USE_COMPUTED_GOTOS 0
702+ #else
703+ #define USE_COMPUTED_GOTOS 1
704+ #endif
697705 #endif
698706#else
699707 #if defined(USE_COMPUTED_GOTOS ) && USE_COMPUTED_GOTOS
You can’t perform that action at this time.
0 commit comments