Why C++ compiles slowly

Eldar Insafutdinov e.insafutdinov at gmail.com
Thu Aug 19 07:35:49 PDT 2010


== Quote from Andrei Alexandrescu (SeeWebsiteForEmail at erdani.org)'s article

> I'm a bit confused - how do you define incremental compilation? The
> build system can be easily set up to compile individual D files to
> object files, and the use the linker in a traditional manner.

I am not sure here, you'd better check that in posts of Tomasz Stachowiak. There
was something wrong with how dmd emits template instantiations. He had to create a
custom build tool that does some hackery. From my experience with D you just can't
do that. I get weird errors and I end up rebuilding the whole thing.

> I'm not sure about that. On the large C++ systems I work on, compilation
> is absolute agony. I don't think that that sets the bar too high.
> Andrei

Can you please elaborate on that? From my experience and understanding if you
modify one cpp file for instance, only this file will be recompiled, then the
project is linked and ready to be run. If you modify a header(which happens less
often) the build system quite fairly recompiles files that include it. And I use
make -j of course, which makes things even easier.


More information about the Digitalmars-d mailing list