Why doesn't DMD create any redundant symbols?

Gregor Richards Richards at codu.org
Tue Aug 28 10:41:58 PDT 2007


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.

  - Gregor Richards



More information about the Digitalmars-d mailing list