The optimizer is not disabled, few global optimizations are. The speedup is mostly the result of not having to reparse the headers, reinstantiate and codegen the generated templated code rather than skip minor opts. This is really slow process that frequently needlessly repeated on multiple compile units. We are looking into this tradeoff, maybe making the decision user-configurable or based on opt. level.
Re:Zapcc: A faster C++ compiler
by andrewchambers on Saturday May 23, 2015 @09:33PM
(#9595034)
The reason C++ builds so slowly is mainly headers and templates iirc, they seem to just be dealing with caching header processing.
TCC is an extremely fast C compiler because it doesn't do any optimising at all.