Ready for review: new std.uni

H. S. Teoh hsteoh at quickfur.ath.cx
Sun Jan 13 22:46:21 PST 2013


On Mon, Jan 14, 2013 at 06:33:44AM +0100, David Nadlinger wrote:
> On Monday, 14 January 2013 at 04:42:33 UTC, Andrei Alexandrescu
> wrote:
> >I'll candidly mention that David's request was unclear to me. It's
> >been winding enough that I missed the key sentence. Was it that we
> >switch dmd to using llvm as backend?
> 
> If you want, yes - but not in the form of an actionable proposal
> yet. I was trying to argue that the benefits of using an existing
> solution like GCC or LLVM are large enough (resp. the costs of using
> a custom backend high enough) that we should seriously consider
> doing so. Especially because it looks as if the amount of work
> needed to keep the DMD backend and thus the reference D compiler
> competitive is going to increase further as other backends are
> gaining things like auto-vectorization to light up modern CPUs and
> ARM is gaining in importance.
[...]

I have to say, as a bystander to this discussion, that I *have* felt the
dilemma of whether to use dmd (I want to try out the latest D features)
vs. gdc/ldc (I want maximal performance for compute-heavy apps).

I don't mean to downplay dmd in any way, but IME code generated by gdc
-O3 has been *consistently* 30-40% faster than code generated by dmd -O,
sometimes even 50% or more. I have compared the assembly code generated
by either compiler, and I have to say that, at least IME, the code
produced by gdc is indisputably superior to the code produced by dmd.
Due to this, I have wanted to use only gdc for my D projects, and I'd
expect that any project where performance is a concern would feel the
same way. But I was forced to use dmd because I wanted to try out the
newest features and get the latest bugfixes as well.  So now I'm torn
between wanting competitive performance vs. getting the bugfixes I need
or the latest and greatest features.

This is far from ideal, IMHO. Users shouldn't have to choose between
up-to-date language support vs. performance. Having the reference D
compiler match gdc/ldc in performance would be a big factor in D
adoption IMO (how many people would spend the time to look up gdc, or
even know it exists, instead of just compiling a C/C++ program with
gcc/g++, compare it to dmd output for a comparable D program, and walk
away?).


T

-- 
WINDOWS = Will Install Needless Data On Whole System -- CompuMan


More information about the Digitalmars-d mailing list