DMD backend quality (Was: Re: DIP 1031--Deprecate Brace-Style Struct Initializers--Community Review Round 1 Discussion)

matheus matheus at gmail.com
Tue Feb 18 21:22:18 UTC 2020


On Tuesday, 18 February 2020 at 20:10:57 UTC, kinke wrote:
> On Tuesday, 18 February 2020 at 18:50:44 UTC, matheus wrote:
>> On Sunday, 16 February 2020 at 00:16:24 UTC, H. S. Teoh wrote:
>>> Unfortunately, the GDC and LDC optimizers consistently 
>>> produce code that outperforms code generated by the DMD 
>>> backend by 20-30%, sometimes as high as 40% for CPU-intensive 
>>> code...
>>
>> Well these numbers are huge, I never thought the difference 
>> would be higher than 10% between these compilers, thanks for 
>> pointing this out.
>
> Once you know that the DMD backend is a formidable one-man 
> project, it should be clear as day that that cannot compete 
> with huge eco-systems like LLVM and GCC with millions of 
> man-hours, in terms of architecture support, optimizations and 
> flexibility. It's nice for fast unoptimized codegen if you are 
> only targeting x86, and probably features better debuginfos 
> than LDC at the moment (well, ecept for Mac apparently), but to 
> me, the DMD *backend* is clearly a dead end in the long run.

Just to be clear, I am NOT diminishing any work, I just wasn't 
aware of these differences, because 20 to 30 or maybe 40% on 
runtime is something that you can't just ignore.

I think that maybe is possible to balance things, like developing 
with DMD and generate final code with GDC/LDC to get faster 
runtime, well maybe some problems will happen mixing compilers 
and final result, but this is something that I will considerate 
for now on.

Matheus.


More information about the Digitalmars-d mailing list