On 19-Aug-2015 00:34, H. S. Teoh via Digitalmars-d wrote:
On Tuesday, 18 August 2015 at 10:45:49 UTC, Walter Bright wrote:
Martin ran some benchmarks recently that showed that ddmd compiled
with dmd was about 30% slower than when compiled with gdc/ldc. This
seems to be fairly typical.
[...]
This matches my experience of dmd vs. gdc as well. No surprise there.
I'm interested in ways to reduce that gap.
[...]
Replace the backend with GDC or LLVM? :-P
Oh come on - LLVM was an inferiour backend for some time.
So what? Let us no work on it 'cause GCC is faster?
Contrary to that turns our C++ plus a better intermediate repr
foundation is a big win that allows to close the gap.
Also DMD's backend strives to stay fast _and_ generate fine machine
code. Getting within 10% of GCC/LLVM and being fast is IMHO both
possible and should be done.
Lastly a backend written in D may take advantage of D's feature to do in
x5 less LOCs what others do in C. And there is plenty of research papers
on optimization floating around and implemented in GCC/LLVM/MSVC so most
of R&D cost is payed by other backends/researchers.
--
Dmitry Olshansky