D slower than C++ in compile time

Lars Ivar Igesund larsivar at igesund.net
Sat Feb 16 08:33:36 PST 2008


Burton Radons wrote:

> Frank Benoit Wrote:
> 
>> Gregor once explained why build tools need to call DMD once per file:
>>
http://www.digitalmars.com/webnews/newsgroups.php?art_group=digitalmars.D&article_id=57473
>> 
>> This makes dsss look like it is slow, but actually this is a concequence
>> of a DMD workaround.
>> 
>> For the DWT library this would lead to compile times >15 minutes!
>> 
>> In the past I found the compile times always a big argument for D.
>> Hopefully this point gets attention at digitalmars ;)
> 
> I don't understand from that link what the problem is. Is there any
> situation where if you pass a complete list of D files to DMD that it
> won't generate the correct code? Or is this isolated to situations where
> you're trying to incrementally compile, which has never worked all that
> great with DMD and will very quickly be slower than calling it with
> everything? All Gregor says is that it produces larger executables than
> strictly necessary which is a problem, sure, but a completely usable
> workaround and far from the show-stopping bugs that should be Walter's
> primary concern right now.
> 
> There may be a way to build a more intelligent linker that can produce
> tighter executables based on knowledge about how D works. I'll look into
> it, but I can't guarantee when.

The link problems have usually stemmed from trying to build libraries which
are then built into an application. Typically the compiler has been so
focused on creating objects for an executable, that there has been missing
and/or conflicting symbols if building an library instead. This has in
particular been a problem with templates, template instances and so.

-- 
Lars Ivar Igesund
blog at http://larsivi.net
DSource, #d.tango & #D: larsivi
Dancing the Tango



More information about the Digitalmars-d mailing list