http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59469
--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> --- (In reply to Markus Trippelsdorf from comment #3) > BTW it is interesting that gcc compiles the attached testcase faster > when using LTO. > > % time g++ -flto=4 -Wfatal-errors -fPIC -shared -fno-rtti -O3 BasicBlock.ii > Function.ii > 52.48s user 0.59s system 168% cpu 31.545 total > % time g++ -Wfatal-errors -fPIC -shared -fno-rtti -O3 BasicBlock.ii > Function.ii > 46.94s user 0.30s system 99% cpu 47.258 total > > (for comparison clang trunk (70% faster): > % time clang++ -Wfatal-errors -fPIC -shared -fno-rtti -O3 BasicBlock.ii > Function.ii > 15.48s user 0.14s system 99% cpu 15.628 total) Is GCC configured with --enable-checking=release? If not then you should not compare to LLVM's compile time.