Red Hat's issues in considering the D language

Jonathan M Davis via Digitalmars-d digitalmars-d at puremagic.com
Wed Dec 21 15:33:50 PST 2016


On Wednesday, December 21, 2016 22:05:32 Yuxuan Shui via Digitalmars-d 
wrote:
> On Wednesday, 21 December 2016 at 21:12:07 UTC, Jerry wrote:
> > On Wednesday, 21 December 2016 at 16:41:58 UTC, Jesse Phillips
> >
> > wrote:
> >> On Wednesday, 21 December 2016 at 16:30:15 UTC, bachmeier
> >>
> >> wrote:
> >>> [...]
> >>
> >> People that want to use D, want to use the latest and
> >> greatest. The reference compiler moves the fastest so they
> >> want the reference compiler to be switched to a different
> >> backend. Why a FOSS back end is required to use D depends on
> >> the person, usually it is political.
> >
> > Any other backend would be better. DMD with -O takes over an
> > hour for my project to compile. In comparison LDC with -O3
> > takes less than a minute and produces a faster binary. It
> > doesn't really make sense to increase the workload maintaining
> > 2-3 different compilers when D is already lacking manpower.
>
> That sounds like a bug in the DMD backend...

Definitely. It is almost always the case that building a program with dmd is
much faster than building with gdc or ldc. The tradeoff is that gdc and ldc
do a much better job optimizing the resultant binary. So, with dmd, you get
fast compilation but a somewhat slower binary, whereas with gdc and ldc, you
get slow compilation but a faster binary.

If anyone is seeing dmd compile anything significantly more slowly than gdc
or ldc, then dmd has a bug, and it should be reported (though reducing the
code to something reportable can be entertaining; fortunately, dustmite can
be a big help with that).

- Jonathan M Davis



More information about the Digitalmars-d mailing list