DMD 1.038 and 2.022 releases

Sönke Ludwig ludwig_no at spam_informatik.uni-luebeck.de
Sat Dec 20 10:01:14 PST 2008


Walter Bright schrieb:
> Sönke Ludwig wrote:
>> In my project compilation takes now several minutes for some files 
>> which compiled in about a second with 2.021. I stopped the compilation 
>> of the whole project after about 2 hours (took 2 min at most on 2.021).
>>
>> I'll try to track this down when I get the time, but i doubt that 
>> those times get anywhere near those of the original.
> 
> Do you have modules that recursively import themselves, and instantiate 
> a lot of templates?

There were some import cycles and I've had some time now to remove all 
of them. There might be a small improvement but it feels just as slow as 
before (still multiple minutes for some files).

In the particular region of the library there is a Variant template in 
use at two places as a typedef: "typedef Variant!(TypeEnum, type1, 
type2, ..., type8);". This would be my main suspect when it comes to 
templates. However, compiling the Variant module alone or a small module 
only using Variant takes a fraction of a second.

I have attached the output of a CodeAnalyst profiling run. The file 
shows the hotspot section during the first 60 seconds of compiling one 
of the files. Percentages have to be multiplied roughly by 2 because 
this is a dual core system.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: dmd1.csv
URL: <http://lists.puremagic.com/pipermail/digitalmars-d-announce/attachments/20081220/763c6486/attachment.asc>


More information about the Digitalmars-d-announce mailing list