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

Mathias Lang pro.mathias.lang at gmail.com
Mon Feb 17 02:07:07 UTC 2020


On Sunday, 16 February 2020 at 22:15:22 UTC, Walter Bright wrote:
> On 2/16/2020 2:52 AM, NaN wrote:
>> I was seeing worse than that last time i used DMD, it was 
>> mostly int code, no fpu, and it was around 60% slower with DMD 
>> than LDC. Haven't used it since. SIMD support with DMD was 
>> awful at the time too, dont know if thats improved.
>
> The SIMD code was substantially improved a year or two ago. I 
> added common subexpression support and improved the register 
> allocator for it.
>
> The main problem is I made a mistake in putting the inliner in 
> the DMD front end. It should be in the back end, where it'll be 
> a lot more effective.

Replying here so as not to pollute the other thread.
Since PR are welcome, can you please take care of 
https://github.com/dlang/dmd/pull/10200 which hasn't been 
reviewed for 6+ months ?

This is the main concern I have with the DMD backend: while it's 
an incredible one-man effort (and I don't think people are giving 
you enough credit for this achievement), it *is* a one-man 
effort, with a bus factor of 1.

It does produce slower code than other backends, generate worse 
debug infos (DWARF debug infos are completely broken on OSX), 
does not support cross-compilation except for `-m32`/`-m64` and 
has a few ABI issues which haven't been solved in years. And 
that's completely understandable, given that amount of work 
required to make things work.

That being said, DMD is still my default compiler for its 
compilation speed (although it's loosing a bit more with every 
release).


More information about the Digitalmars-d mailing list