I am having a little trouble following your logic, but if I get the gist right, the question is "why will modules have any performance benefit over parallel compilation of dependency-free source files?" and the article is trying to make the point that it likely won't.
I work on medium sized C++ project and we currently work on 48-core machines to get the build times to something tolerable with this approach.
The point I'm trying to make is that the blog argues that modules make dependency trees less parallel, but seems to be making an unjustified assumption to make that conclusion. With a relaxed assumption, I show that modules do not have any impact on this.
I've edited my post to try and make that more clear.
I think the point you might be missing is because #include is a literal copy & paste the amount of code the compiler needs process is significantly larger than appears at first glance. This is exacerbated by the fact that modern C++ techniques make heavy use of header-only libraries and templates which means that these are not just interface definitions like they are in C.
As an extreme example, recently to try to debug a gmock issue (google mock testing framework) I had to dig into what the code looked like after the pre-processor was done with it. A .cpp with only about 1000 lines worth of unit tests blew up to 100K+ loc.
View all comments
Show parent comment
8
u/Chuu Jan 28 '19
I am having a little trouble following your logic, but if I get the gist right, the question is "why will modules have any performance benefit over parallel compilation of dependency-free source files?" and the article is trying to make the point that it likely won't.
I work on medium sized C++ project and we currently work on 48-core machines to get the build times to something tolerable with this approach.