https://gcc.gnu.org/bugzilla/show_bug.cgi?id=14840
--- Comment #14 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Compile time using the same base compiler (without the patch and with --enable-checking=yes) Without the patch: apinski@xeond:~/src/upstream-gcc/gcc/objdir/gcc$ time make -j16 generic-match.o CXXFLAGS="-O2 -g" /home/apinski/src/upstream-gcc/gcc/objdir/./prev-gcc/xg++ -B/home/apinski/src/upstream-gcc/gcc/objdir/./prev-gcc/ -B/home/apinski/upstream-gcc/x86_64-pc-linux-gnu/bin/ -nostdinc++ -B/home/apinski/src/upstream-gcc/gcc/objdir/prev-x86_64-pc-linux-gnu/libstdc++-v3/src/.libs -B/home/apinski/src/upstream-gcc/gcc/objdir/prev-x86_64-pc-linux-gnu/libstdc++-v3/libsupc++/.libs -I/home/apinski/src/upstream-gcc/gcc/objdir/prev-x86_64-pc-linux-gnu/libstdc++-v3/include/x86_64-pc-linux-gnu -I/home/apinski/src/upstream-gcc/gcc/objdir/prev-x86_64-pc-linux-gnu/libstdc++-v3/include -I/home/apinski/src/upstream-gcc/gcc/libstdc++-v3/libsupc++ -L/home/apinski/src/upstream-gcc/gcc/objdir/prev-x86_64-pc-linux-gnu/libstdc++-v3/src/.libs -L/home/apinski/src/upstream-gcc/gcc/objdir/prev-x86_64-pc-linux-gnu/libstdc++-v3/libsupc++/.libs -fno-PIE -c -O2 -g -DIN_GCC -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Werror -fno-common -Wno-unused -DHAVE_CONFIG_H -I. -I. -I/home/apinski/src/upstream-gcc/gcc/gcc -I/home/apinski/src/upstream-gcc/gcc/gcc/. -I/home/apinski/src/upstream-gcc/gcc/gcc/../include -I/home/apinski/src/upstream-gcc/gcc/gcc/../libcpp/include -I/home/apinski/src/upstream-gcc/gcc/gcc/../libcody -I/home/apinski/src/upstream-gcc/gcc/objdir/./gmp -I/home/apinski/src/upstream-gcc/gcc/gmp -I/home/apinski/src/upstream-gcc/gcc/objdir/./mpfr/src -I/home/apinski/src/upstream-gcc/gcc/mpfr/src -I/home/apinski/src/upstream-gcc/gcc/mpc/src -I/home/apinski/src/upstream-gcc/gcc/gcc/../libdecnumber -I/home/apinski/src/upstream-gcc/gcc/gcc/../libdecnumber/bid -I../libdecnumber -I/home/apinski/src/upstream-gcc/gcc/gcc/../libbacktrace -I/home/apinski/src/upstream-gcc/gcc/objdir/./isl/include -I/home/apinski/src/upstream-gcc/gcc/isl/include -o generic-match.o -MT generic-match.o -MMD -MP -MF ./.deps/generic-match.TPo generic-match.cc real 1m48.703s user 1m47.137s sys 0m1.458s with the patch: apinski@xeond:~/src/upstream-gcc/gcc/objdir/gcc$ time make -j16 generic-match.o CXXFLAGS="-O2 -g" /home/apinski/src/upstream-gcc/gcc/objdir/./prev-gcc/xg++ -B/home/apinski/src/upstream-gcc/gcc/objdir/./prev-gcc/ -B/home/apinski/upstream-gcc/x86_64-pc-linux-gnu/bin/ -nostdinc++ -B/home/apinski/src/upstream-gcc/gcc/objdir/prev-x86_64-pc-linux-gnu/libstdc++-v3/src/.libs -B/home/apinski/src/upstream-gcc/gcc/objdir/prev-x86_64-pc-linux-gnu/libstdc++-v3/libsupc++/.libs -I/home/apinski/src/upstream-gcc/gcc/objdir/prev-x86_64-pc-linux-gnu/libstdc++-v3/include/x86_64-pc-linux-gnu -I/home/apinski/src/upstream-gcc/gcc/objdir/prev-x86_64-pc-linux-gnu/libstdc++-v3/include -I/home/apinski/src/upstream-gcc/gcc/libstdc++-v3/libsupc++ -L/home/apinski/src/upstream-gcc/gcc/objdir/prev-x86_64-pc-linux-gnu/libstdc++-v3/src/.libs -L/home/apinski/src/upstream-gcc/gcc/objdir/prev-x86_64-pc-linux-gnu/libstdc++-v3/libsupc++/.libs -fno-PIE -c -O2 -g -DIN_GCC -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Werror -fno-common -Wno-unused -DHAVE_CONFIG_H -I. -I. -I/home/apinski/src/upstream-gcc/gcc/gcc -I/home/apinski/src/upstream-gcc/gcc/gcc/. -I/home/apinski/src/upstream-gcc/gcc/gcc/../include -I/home/apinski/src/upstream-gcc/gcc/gcc/../libcpp/include -I/home/apinski/src/upstream-gcc/gcc/gcc/../libcody -I/home/apinski/src/upstream-gcc/gcc/objdir/./gmp -I/home/apinski/src/upstream-gcc/gcc/gmp -I/home/apinski/src/upstream-gcc/gcc/objdir/./mpfr/src -I/home/apinski/src/upstream-gcc/gcc/mpfr/src -I/home/apinski/src/upstream-gcc/gcc/mpc/src -I/home/apinski/src/upstream-gcc/gcc/gcc/../libdecnumber -I/home/apinski/src/upstream-gcc/gcc/gcc/../libdecnumber/bid -I../libdecnumber -I/home/apinski/src/upstream-gcc/gcc/gcc/../libbacktrace -I/home/apinski/src/upstream-gcc/gcc/objdir/./isl/include -I/home/apinski/src/upstream-gcc/gcc/isl/include -o generic-match.o -MT generic-match.o -MMD -MP -MF ./.deps/generic-match.TPo generic-match.cc real 1m41.673s user 1m39.165s sys 0m1.462s So slightly faster (~7%). I wonder if it is because there is less debug info produced. generic-match.cc is the best case of what this can do really.