Study: build times for D programs
Jonathan M Davis
jmdavisProg at gmx.com
Wed Jul 25 14:56:14 PDT 2012
On Wednesday, July 25, 2012 22:53:08 Rainer Schuetze wrote:
> On 25.07.2012 19:24, Walter Bright wrote:
> > On 7/25/2012 8:13 AM, Andrei Alexandrescu wrote:
> >> Yes, and both debug and release build times are important.
> >
> > Optimized build time comparisons are less relevant - are you really
> > willing to trade off faster optimization times for less optimization?
> >
> > I think it's more the time of the edit-compile-debug loop, which would
> > be the unoptimized build times.
>
> The "edit-compile-debug loop" is a use case where the D module system
> does not shine so well. Compare build times when only editing a single
> source file:
> With the help of incremental linking, building a large C++ project only
> takes seconds.
> In contrast, the D project usually recompiles everything from scratch
> with every little change.
D should actually compile _faster_ if you compile everything at once -
certainly for smaller projects - since it then only has to lex and parse each
module once. Incremental builds avoid having to fully compile each module
every time, but there's still plenty of extra lexing and parsing which goes
on.
I don't know how much it shifts with large projects (maybe incremental builds
actually end up being better then, because you have enough files which aren't
related to one another that the amount of code which needs to be relexed a
reparsed is minimal in comparison to the number of files), but you can do
incremental building with dmd if you want to. It's just more typical to do it
all at once, because for most projects, that's faster. So, I don't see how
there's an complaint against D here.
- Jonathan M Davis
More information about the Digitalmars-d
mailing list