A caching compiler for C

Breaking the source text of a contemporary C program into separate compilation units and employing aggressive selective compilation schemes can greatly reduce the amount of time spent compiling programs. However, much redundant processing still occurs when a single compilation unit is compiled repeatedly, during the repetitive edit-compile-debug cycle, for example, or when a large number of compilation units are selected for compilation. We investigate the benefits of retaining internal representations of header files for reuse in subsequent invocations of the compiler, thus speeding up compilation. Our general, transparent, adaptive approach experimentally achieves a 60% reduction in compilation time in the average repetitive case, and a 40% reduction in the average massive case.