Hacker News new | past | comments | ask | show | jobs | submit login

I doubt it speeds up compile time on subsequent builds, as any change in one part of the project means that everything has to be recompiled.



Not quite. It presumably only concatenates the headers, which are read any time a dependant file is complied. The advantage is that the compiler doesn't have to open and read a header every time it encounters an include at the top of a dependent file. Instead, the dependency tree is given once, and each header is opened once.

This is apparently the same approach taken in the Plan9 source code to reduce compile times, and by basically any language with a module system (except module systems allow you to give the dependencies in each file).




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: