DMD is slow for matrix maths?

Laeeth Isharc via Digitalmars-d digitalmars-d at puremagic.com
Mon Oct 26 19:21:38 PDT 2015


On Monday, 26 October 2015 at 23:13:22 UTC, Jack Stouffer wrote:
> On Monday, 26 October 2015 at 21:29:47 UTC, default0 wrote:
>> On Monday, 26 October 2015 at 20:30:51 UTC, rsw0x wrote:
>>>
>>> dmd will never reach gdc/ldc performance, gcc and LLVM have 
>>> entire teams of people that actively contribute to their 
>>> compilers.
>>
>> We have a Walter though :-)
>
> Walter has a job as well as trying to manage the programming 
> language as a whole. He also makes contributions to Phobos and 
> druntime which eat up time that he would otherwise spend on 
> dmd. Also, Walter seems to be the only one who understands the 
> backend code of dmd, so even if we left aside the licensing 
> issues (which are huge), that really limits the quality of the 
> backend as generally only one set of eyes are on the code.
>
> Compare that to the team of LLVM, which has people working full 
> time on it as well as major contributions from some of the 
> largest tech companies.

Someone who says never is certainly making a bold claim in an 
uncertain world at a time when the basic factors governing the 
fate of D are visibly shifting in a positive direction.  In 
addition, it's mildly demoralising to others to say such things, 
no matter how good ones intent might be.

I don't know much about compiler backends, but It doesn't sound 
like in the medium term significantly improving the backend code 
is something utterly fantastic, like sending a man to the moon 
umm I mean private sector space travel, hmmm well better pick a 
different example.  You maybe need some increase in 
contributions, and maybe also some companies that have an 
interest in using dmd and that can pay for some resources to 
help.  Was Weka not using DMD, for example ?  (Maybe I 
misremember).  These things will change over time - look at the 
spurt of hiring lately, and I am doing my small part too 
(beginnings are often small).

So I would suggest it isn't productive to think about whether Dmd 
will catch up.  Maybe, maybe not.  Doesn't matter.  Making it 
faster will help many - this defeatist attitude of 'why bother - 
just use GDC or LDC' may not be the best long-term strategy 
(remember that these too are volunteer projects, and they don't 
have an army, especially GDC, and you shouldn't assume that 
magically they'll always manage just because they have so far), 
whether or not it catches up.  There's always an opportunity 
cost, but so what.

One should treat dmd performance as an interesting challenge, not 
something that's set in stone, and can never much change.



More information about the Digitalmars-d mailing list