https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65076
--- Comment #29 from Jan Hubicka <hubicka at gcc dot gnu.org> --- I also tested with -Os and compile times seems about same as for 4.9 modulo noise. The following one liner brings instruction and function count in final binary to same as in 4.9: Index: ipa-inline.c =================================================================== --- ipa-inline.c (revision 221757) +++ ipa-inline.c (working copy) @@ -1099,7 +1099,7 @@ edge_badness (struct cgraph_edge *edge, numerator = numerator >> 11; denominator = growth; if (callee_info->growth > 0) - denominator *= callee_info->growth; + denominator *= callee_info->growth * callee_info->growth; badness = - numerator / denominator; I think this makes a lot of sense - it somehow makes growth of a given call more important than growth for inlining everything and it also makes inliner to more strongly prefer small growth, so I think I will commit it after testing with plan for quick reversal if some benchmarks decrease significantly. (in fact I had that patch scheduled for bechmarking for couple months) I am testing it on my copy of C++ suite and will try to run firefox benchmarks and look for off-noise differences.