Study: build times for D programs
Jonathan M Davis
jmdavisProg at gmx.com
Wed Jul 25 15:42:15 PDT 2012
On Thursday, July 26, 2012 00:34:07 Andrej Mitrovic wrote:
> On 7/25/12, Jonathan M Davis <jmdavisProg at gmx.com> wrote:
> > 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.
> That's assuming that the lexing/parsing is the bottleneck for DMD.
Not necessarily. The point is that there's extra work that has to be done when
compiling separately. So, whether it takes more or less time depends on how
much other work you're avoiding by doing an incremental build. Certainly, I'd
expect a full incremental build from scratch to take longer than one which was
not incremental.
> For example: a full build of WindowsAPI takes 14.6 seconds on my machine.
> But when compiling one module at a time and using parallelism it takes
> 7 seconds instead. And all it takes is a simple parallel loop.
Parallelism? How on earth do you manage that? dmd has no support for running
on multiple threads AFAIK. Do you run multiple copies of dmd at once?
Certainly, compiling files in parallel changes things. You've got multiple
cores working on it at that point, so the equation is completely different.
- Jonathan M Davis
More information about the Digitalmars-d
mailing list