So regarding my assumptions about translating the D front end expressions
to GCC? Is that all simpler than I imagine?
Do you think GDC generates optimal code comparable to C code?

What about pure functions, can you make good on optimisations like caching
results of pure functions, moving them outside loops, etc?

On 6 January 2012 00:03, Iain Buclaw <ibuc...@ubuntu.com> wrote:

> On 5 January 2012 16:49, Manu <turkey...@gmail.com> wrote:
> >> D is not a compiler, it is a language. Furthermore it is not true that
> >> DMDs backend is rubbish and there are already more backends than just
> the
> >> DMC backend.
> >
> >
> > Sorry, I was generalising a little general in that claim. And where I say
> > 'rubbish', I was drawing comparison to the maturity of C compilers for
> x86,
> > which STILL have trouble and make lots of mistakes with centuries of man
> > hours of work.
> > DMD has inferior code gen (there was a post last night comparing some
> > disassemblies of trivial programs with GDC), will probably never rival
> GCC,
> > that's fine, it's a reference, I get that.
> > But to say that using GDC will magically fix code gen is also false. I'm
> not
> > familiar with the GCC code, so I may be wrong, but my understanding is
> that
> > there is frontend work, and frontend-GCC glue work that will allow for
> back
> > end optimisation (which GCC can do quite well) to work properly. This is
> > still a lot of work for a small OSS team.
> > I also wonder if the D language provides some opportunities for
> optimisation
> > that aren't expressible in other languages, and therefore may not already
> > have an expression in the GCC back end... so I can imagine some of future
> > optimisations frequently discussed in this forum won't just magically
> appear
> > with GCC/LLVM maturity. I can't imagine Iain and co extending the GCC
> back
> > end to support some obscure D optimisations happening any time soon.
> >
>
> Actually, it's just me. ;)
>
> So far I have come across no D optimisations that aren't supported in
> GCC.  Infact, most of the time I find myself thinking of how I can use
> obscure GCC optimisation X to improve D.    One example is an
> interesting feature of Fortran, though written with C++ in mind. Seems
> like something that could be right up D's street.
>
>
> http://www.digitalmars.com/webnews/newsgroups.php?art_group=digitalmars.D&article_id=147822
>
> --
> Iain Buclaw
>
> *(p < e ? p++ : p) = (c & 0x0f) + '0';
>

Reply via email to