▲ | wavemode 3 days ago | |
How much of the speedup you're seeing is modules, versus the inherent speedup of splitting and organizing your codebase/includes in a cleaner way? It doesn't sound like your project is actually compiling faster than before, but rather it is REcompiling faster, suggesting that your real problem was that too much code was being recompiled on every change (which is commonly due to too-large translation units and too many transitive dependencies between headers). | ||
▲ | achatham 3 days ago | parent [-] | |
This was in place of reorganizing the codebase, which would have been the alternative. I've done such work in the past, and I've found it's a pretty rare skillet to optimize compilation speed. There's just a lot less input for the compiler to look at, as the useless transitive text is dropped. And to be clear, it also speeds up the original compilation, but that's not as noticeable because when you're compiling zillions of separate compilation units with massive parallelism, you don't notice how long any given file takes to compile. |