dmd codegen improvements

rsw0x via Digitalmars-d digitalmars-d at puremagic.com
Tue Aug 18 14:48:11 PDT 2015


On Tuesday, 18 August 2015 at 21:41:26 UTC, deadalnix wrote:
> On Tuesday, 18 August 2015 at 21:26:43 UTC, rsw0x wrote:
>> On Tuesday, 18 August 2015 at 21:18:34 UTC, rsw0x wrote:
>>> On Tuesday, 18 August 2015 at 10:45:49 UTC, Walter Bright 
>>> wrote:
>>>> Martin ran some benchmarks recently that showed that ddmd 
>>>> compiled with dmd was about 30% slower than when compiled 
>>>> with gdc/ldc. This seems to be fairly typical.
>>>>
>>>> I'm interested in ways to reduce that gap.
>>>
>>> retire dmd?
>>> this is ridiculous.
>>
>> To further expand upon this,
>> if you want to make D fast - Fix the interface between the 
>> compiler and the runtime(including the inability for compilers 
>> to inline simple things like allocations which makes 
>> allocations have massive overheads.) Then, fix the GC. Make 
>> the GC both shared and immutable aware, then moving the GC to 
>> a thread local "island"-style GC would be fairly easy. D's GC 
>> is probably the slowest GC of any major language available, 
>> and the entire thing is wrapped in mutexes.
>>
>
> I've been working on that for a while. It is definitively the 
> right direction fro D IMO, but that is far from being "fairly 
> easy".
>
>> D has far, far bigger performance problems that dmd's backend.
>>
>> Maybe you should take a look at what Go has recently done with 
>> their GC to get an idea of what D's competition has been up 
>> to. https://talks.golang.org/2015/go-gc.pdf

I used 'fairly easy' in the 'the implementation is left to the 
reader' sort of way ;)

But yes, we discussed this on Twitter and Walter confirmed what I 
thought would be a huge issue with this. Shared needs to be 
changed for a GC like that to be implemented.
D's current GC could see improvements, but it will never ever 
catch up to the GC of any other major language without changes to 
the language itself.


More information about the Digitalmars-d mailing list