dmd codegen improvements

deadalnix via Digitalmars-d digitalmars-d at puremagic.com
Tue Aug 18 14:33:27 PDT 2015


On Tuesday, 18 August 2015 at 21:25:35 UTC, Walter Bright wrote:
> On 8/18/2015 1:47 PM, deadalnix wrote:
>> Realistically, D does not have the man power required to reach 
>> the same level of
>> optimization, and have many higher impact task to spend that 
>> manpower on.
>
> dmd also does a sludge of patterns. I'm just looking for a few 
> that would significantly impact the result.

There is none. There is a ton of 0.5% one that adds up to the 30% 
difference.

If I'd were to bet on what would impact DMD perfs the most, I'd 
go for SRAO, and a inliner in the middle end that works bottom up 
:
  - Explore the call graph to-down optimizing functions along the 
way
  - Backtrack bottom-up and check for inlining opportunities.
  - Rerun optimizations on the function inlining was done in.

It require a fair amount of tweaking and probably need a way for 
the backends to provide a cost heuristic for various functions, 
but that would leverage the patterns already existing in the 
backend.


More information about the Digitalmars-d mailing list