--with-computed-gotos optimizations probably nullified by cse

Bug #1183600 reported by Michael Hudson-Doyle
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python3.3 (Ubuntu)
New
Undecided
Unassigned

Bug Description

The packaging for python 3.3 enables the --with-computed-gotos flag to configure. But as discussed in the gcc documentation (http://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html#index-fgcse-781) the benefits of computed gotos are often eliminated by common subexpression elimination.

Testing I have done, which I need to be more systematic about, certainly suggests that this is the case: if you pass --with-computed-gotos and arrange to include -fno-gcse in the optimization flags, you see performance improvements. If you don't arrange to include -fno-gcse, you get performance identical to not passing --with-computed-gotos.

It would be best to just disable CSE for PyEval_EvalFrameEx, but that function is so dominant in run time that disabling it globally is and getting the benefits of the computed gotos is probably still a win overall.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.