Study: build times for D programs

Joseph Rushton Wakeling joseph.wakeling at webdrake.net
Wed Jul 25 03:20:59 PDT 2012


On 25/07/12 09:37, David Nadlinger wrote:
> On Tuesday, 24 July 2012 at 23:55:03 UTC, Joseph Rushton Wakeling wrote:
>>  For a rough comparison: […]
>
> Even for a rough comparison of compile times, you need to include compiler
> switches used. For example, the difference between Clang -O0 vs. Clang -O3 is
> usually huge.

C++ compiler and library flags: -ansi -pedantic -Wall -O3 -march=native 
-mtune=native -I. -DHAVE_INLINE -lm -lgsl -lgslcblas -lgrsl

dmd and gdmd flags: -O -release -inline (which for gdmd corresponds to -O3 -fweb 
-frelease -finline-functions -I /usr/local/include/d2/).

And yes, as Ali observed, this is a very small codebase (D is 3 files, 374 lines 
total; C++ is 18 files, 1266 lines -- so the comparison isn't 100% fair; but on 
the other hand, that's testament to how D can be used for more elegant code....).


More information about the Digitalmars-d mailing list