Performance improvements for D / DMD compiler.

Frits van Bommel fvbommel at REMwOVExCAPSs.nl
Fri Jan 19 11:13:45 PST 2007


BCS wrote:
> Better const folding/handling, local const values are put into the stack 
> frame even if they are never used. (disassemble a run of my bignum 
> template to see this).

On a related note: put global variables (especially constants) into 
special sections of the object file. That way they can be removed by 
--gc-sections if not used (or optimized out). Constants are frequently 
completely folded but still instantiated, this just adds bloat. This 
isn't really a performance optimization so much as managing its 
side-effects.

(Also, why is a const int added to .data instead of .rodata?)



More information about the Digitalmars-d mailing list