https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83262
--- Comment #4 from Dominique d'Humieres <dominiq at lps dot ens.fr> --- The speed depends on the optimization level, SELECT CASE being the fastest with -O1 -O0 GOTO costs totally 4.667 (s) SELECT CASE costs totally 4.578 (s) IF-Goto costs totally 4.986 (s) IF-noGoto costs totally 5.734 (s) IF-ELSE costs totally 5.731 (s) -O1 GOTO costs totally 1.231 (s) SELECT CASE costs totally 1.181 (s) IF-Goto costs totally 1.826 (s) IF-noGoto costs totally 1.738 (s) IF-ELSE costs totally 1.668 (s) -O2 GOTO costs totally 3.721 (s) SELECT CASE costs totally 4.274 (s) IF-Goto costs totally 1.517 (s) IF-noGoto costs totally 1.482 (s) IF-ELSE costs totally 1.525 (s) -O3 GOTO costs totally 3.755 (s) SELECT CASE costs totally 4.234 (s) IF-Goto costs totally 1.497 (s) IF-noGoto costs totally 1.522 (s) IF-ELSE costs totally 1.537 (s) -Ofast GOTO costs totally 3.280 (s) SELECT CASE costs totally 4.324 (s) IF-Goto costs totally 1.526 (s) IF-noGoto costs totally 1.534 (s) IF-ELSE costs totally 1.513 (s)