Optlink Contribution

Jonathan Marler via Digitalmars-d digitalmars-d at puremagic.com
Thu Jul 31 00:07:25 PDT 2014


On Thursday, 31 July 2014 at 06:46:19 UTC, Kagamin wrote:
> On Wednesday, 30 July 2014 at 19:50:35 UTC, Jonathan Marler 
> wrote:
>> I like the discussion.  I do want to remind everyone that 
>> OPTLINK is very fast and switching to a different linker will 
>> likely result performance hit.
>
> Wouldn't it be easier to optimize a linker written in D than 
> tinker with optlink?

No matter how much you optimize your D code, you will only ever 
be able to use a subset of what assembly can do.  That being 
said, writing perfect assembly code is impossible, so we rely on 
the compiler to take our higher level concepts and have it decide 
on the best way to optimize.  The beauty of higher level 
languages is you can make high level changes resulting an a 
cascade of optimizations.  But the downside is sometimes changes 
can have cascading adverse affects as well.  One of the things I 
like about D is that it does a much better job of allowing the 
programmer to tell the compiler the "right" information it needs 
to know how to optimize.

I would like to see a linker written in D and see how it compares 
to optlink.  But I would reserve making a decision on moving to 
another linker until I got some solid performance data.  Some 
performance data for a D linker compiled with all three D 
compilers as well.


More information about the Digitalmars-d mailing list