cHash: Avoid redundant build operations by AST-based hashing
During the lifetime of a software project, the compiler is invoked thousands if not hundred-thousands of times. However, the actual source base is only gradually changing. In combination, the a high number of compilations is redundant and could be avoided. A lower number of compiler invocations will not only speed up the development process, since the developer has not to wait for the compiler, but it also saves resources in terms of precious joules.
The cHash project consists of several components:
- Compiler plugins that detect redundant builds precisely via the mechanism of AST hashing. The result of the AST hash operation is a semantic fingerprint of a single compilation unit. If the fingerprint does not change, the resulting object file will be semantically equivalent.
- An extension to the build system to further propagate the has-not-changed predicate along the build system dependencies.
Best Paper Award
cHash: Detection of Redundant Compilations via AST Hashing
Proceedings of the 2017 USENIX Annual Technical ConferenceUSENIX Association2017Best Paper Award.