const debacle

Lars Ivar Igesund larsivar at igesund.net
Sat Mar 22 08:46:58 PDT 2008


Janice Caron wrote:

> On 22/03/2008, Lars Ivar Igesund <larsivar at igesund.net> wrote:
>>  > Now library developers just have to begin using this kind of aliases
>>  > for templates which get only used with a few, known types
>>
>> They're not because current tool chain is not able to remove the unused
>>  variations from the executables, thus you're likely to get 3 times the
>>  codegen that you need, also called bloat.
> 
> If that's true then the solution is to fix the linker.
> 
> This thread is about looking ahead to what /could/ be possible, not
> about what is possible now. We /could/ implement return types whose
> constancy is dependent on input types, if, in the future, if (1) the
> suggestions I made are implemented, and (2) the linker is optimised to
> remove that which is unused. As a side-effect, Sean's
> three-types-of-string example would then also benefit from that linker
> optimisation.
> 
> That said, I'm /very/ surprised to hear that OptLink can't do that
> already.

Optlink doesn't and Walter has stated in the past that optlink will not be
developed further. Note that ld isn't any better, but that llvmdc should be
capable to elide unused instantiatons.

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



More information about the Digitalmars-d mailing list