Why C++ compiles slowly
Sean Kelly
sean at invisibleduck.org
Thu Aug 19 07:50:22 PDT 2010
Eldar Insafutdinov Wrote:
> == 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.
There used to be a number of issues with where TypeInfo was generated, references to in/out contracts and other auto-generated functions, etc, but I think they've all been addressed.
> > 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.
It's always possible to use headers in D as well, though I think the tipping point is far different from where it is in C++.
More information about the Digitalmars-d
mailing list