Why doesn't DMD create any redundant symbols?

Frank Benoit keinfarbton at googlemail.com
Thu Feb 14 14:46:09 PST 2008


Walter Bright schrieb:
> Gregor Richards wrote:
>> Walter Bright wrote:
>>> Gregor Richards wrote:
>>>> I have to assume there's a reason for this, so, to summarize: Why 
>>>> doesn't DMD create any redundant symbols in .o files?
>>>
>>> It can improve build speed a lot. With C++, which doesn't do this, 
>>> huge .obj files can be generated.
>>>
>>> The compiler assumes that if there are multiple modules on the 
>>> command line, they'll all be linked together, so why generate 
>>> redundant output?
>>
>> OK, so how about for those willing to (or required to) take the 
>> performance penalty, adding an option to create redundant data? I 
>> imagine the speed difference between compiling one file at a time and 
>> compiling all at once but with redundant data is greater than the 
>> speed difference between compiling all at once with and without 
>> redundant data, so your improvement to build speed significantly 
>> hinders my build speed.
> 
> It's a good idea, but it would be a fair bit of work the way dmd is 
> designed.

DSSS has the option oneatatime=on as the default now, to avoid problems. 
But the compile time is no more acceptable.

Several ppl complained that after 15 min they canceled compilation of 
DWT. With doing it with oneatatime=off the same took <15 sec.

See also http://d.puremagic.com/issues/show_bug.cgi?id=1838






More information about the Digitalmars-d mailing list