←back to thread

141 points vblanco | 1 comments | | HN request time: 0.203s | source
Show context
Asooka ◴[] No.44436332[source]
I would like to see a comparison between modules and precompiled headers. I have a suspicion that using precompiled headers could provide the same build time gains with much less work.
replies(4): >>44436478 #>>44436777 #>>44436830 #>>44439283 #
1. barchar ◴[] No.44439283[source]
So, clang's modules are quite similar to clangs precompiled headers, especially the "chained" pchs. With PCH you have to wait on the serial PCH compilation step before you can get any parallelism, with modules you can compile each part of the "PCH" in parallel and anything using some subset of your dependencies can get started without waiting on things it doesn't use.

Header units are basically chained PCHs. Sadly they are hard to build correctly at the moment.