https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65076
--- Comment #52 from Jan Hubicka <hubicka at gcc dot gnu.org> --- $ time /aux/hubicka/trunk-install/bin/g++ -Ofast -fpermissive --param large-function-insns=1 tramp3d-v4.ii -w ; ./a.out -n 3 real 0m34.232s user 0m33.729s sys 0m0.532s i = 1 t = 0.00209225 dt = 0.00209225 (0.0175509s/it) i = 2 t = 0.00410537 dt = 0.00201312 (0.164169s/it) i = 3 t = 0.00603889 dt = 0.00193352 (0.167095s/it) $ time /aux/hubicka/trunk-install/bin/g++ -Ofast -fpermissive --param large-function-insns=10 tramp3d-v4.ii -w ; ./a.out -n 3 real 0m34.226s user 0m33.749s sys 0m0.506s i = 1 t = 0.00209225 dt = 0.00209225 (0.0187211s/it) i = 2 t = 0.00410537 dt = 0.00201312 (0.177041s/it) i = 3 t = 0.00603889 dt = 0.00193352 (0.181561s/it) $ time /aux/hubicka/trunk-install/bin/g++ -Ofast -fpermissive --param large-function-insns=100 tramp3d-v4.ii -w ; ./a.out -n 3 real 0m34.012s user 0m33.455s sys 0m0.586s i = 1 t = 0.00209225 dt = 0.00209225 (0.0175891s/it) i = 2 t = 0.00410537 dt = 0.00201312 (0.172188s/it) i = 3 t = 0.00603889 dt = 0.00193352 (0.175776s/it) $ time /aux/hubicka/trunk-install/bin/g++ -Ofast -fpermissive --param large-function-insns=500 tramp3d-v4.ii -w ; ./a.out -n 3 real 0m35.720s user 0m35.252s sys 0m0.498s i = 1 t = 0.00209225 dt = 0.00209225 (0.0190959s/it) i = 2 t = 0.00410537 dt = 0.00201312 (0.147543s/it) i = 3 t = 0.00603889 dt = 0.00193352 (0.151731s/it) $ time /aux/hubicka/trunk-install/bin/g++ -Ofast -fpermissive --param large-function-insns=2700 tramp3d-v4.ii -w ; ./a.out -n 3 real 0m36.697s user 0m36.192s sys 0m0.536s $ time /aux/hubicka/trunk-install/bin/g++ -Ofast -fpermissive --param large-function-insns=1000 tramp3d-v4.ii -w ; ./a.out -n 3 real 0m36.369s user 0m35.900s sys 0m0.500s i = 1 t = 0.00209225 dt = 0.00209225 (0.00889301s/it) i = 2 t = 0.00410537 dt = 0.00201312 (0.137394s/it) i = 3 t = 0.00603889 dt = 0.00193352 (0.14172s/it) $ time /aux/hubicka/trunk-install/bin/g++ -Ofast -fpermissive --param large-function-insns=2700 tramp3d-v4.ii -w ; ./a.out -n 3 real 0m36.730s user 0m36.216s sys 0m0.546s i = 1 t = 0.00209225 dt = 0.00209225 (0.00888801s/it) i = 2 t = 0.00410537 dt = 0.00201312 (0.134414s/it) i = 3 t = 0.00603889 dt = 0.00193352 (0.137397s/it) $ time /aux/hubicka/trunk-install/bin/g++ -Ofast -fpermissive --param large-function-insns=10000 tramp3d-v4.ii -w ; ./a.out -n 3 real 0m37.722s user 0m37.215s sys 0m0.539s i = 1 t = 0.00209225 dt = 0.00209225 (0.00893092s/it) i = 2 t = 0.00410537 dt = 0.00201312 (0.171207s/it) i = 3 t = 0.00603889 dt = 0.00193352 (0.17444s/it) $ time /aux/hubicka/trunk-install/bin/g++ -Ofast -fpermissive --param large-function-insns=100000 tramp3d-v4.ii -w ; ./a.out -n 3 real 0m37.675s user 0m37.147s sys 0m0.559s i = 1 t = 0.00209225 dt = 0.00209225 (0.00888085s/it) i = 2 t = 0.00410537 dt = 0.00201312 (0.169823s/it) i = 3 t = 0.00603889 dt = 0.00193352 (0.173361s/it) So there seems to be 8% compile time performance drop somewhere in between 100 and 1000 of large-function-insns and the current default 2700 seems to sit in sweet spot of the performance (bellow 500 or above 10000 starts dropping). The text segment size is 589645 for 10000, 587750 for 2700, 591666 for 1000, 576922 for 500 GCC 4.9 seems happy with growth of 100 and drops a bit at growth of 30. It also delivers smaller binary at those growth settings (489406 bytes). So it seems to suggest that noticeable part of the remaining regression may be due to new heuristics prefferring large functions. I will experiment with re-adding the combined function size into the denomiator. But my first experiments does not look amazing.