Using DMD's -v to build dependencies

Sergey Gromov snake.scaly at gmail.com
Sat Dec 13 10:35:04 PST 2008


Sat, 13 Dec 2008 07:37:18 +0900, Bill Baxter wrote:

> So how fast is dmd -o-?  Does this pretty much double the compile time?
> An option to reuse a previously generated .deps might be nice.

Here's the benchmark.

I'm compiling dwt-samples\examples\helloworld\HelloWorld5.d from dwt
trunk rev. 119, without any pre-compilation.  The system is a 1.83 GHz
Core2 Duo notebook under Win XP.  The compiler is DMD 1.033/Tango.

The -c -o- -v stage takes 0.97 seconds (best of five, all files in
memory, no swap).  The result is a list of 202 files in win-dwt.  That's
more than a half of dwt (357 .d files).

The actual build phase takes 3.27 seconds, best of five, etc.  The
result is a working 1.7 MB executable.

So the -v phase is at least 3 times faster than the actual compilation.
Also note that in -o- mode the compiler misses some semantic errors
which means it doesn't do full analysis.



More information about the Digitalmars-d mailing list