D compiles fast, right? Right??

H. S. Teoh hsteoh at quickfur.ath.cx
Mon Apr 2 15:50:21 UTC 2018


On Mon, Apr 02, 2018 at 12:35:03PM +0000, Atila Neves via Digitalmars-d wrote:
> On Sunday, 1 April 2018 at 02:40:26 UTC, Walter Bright wrote:
> > On 3/30/2018 1:17 PM, Andrei Alexandrescu wrote:
> > > Could be faster.
> > 
> > It's been a fair amount of time since somebody has done profiling of
> > dmd. It needs to be done. There's probably plenty of low hanging
> > fruit.  Speculating about why it is slow is pointless without data.
> 
> I profiled it as soon as I had the numbers. I didn't bother to mention
> it because I thought I'd just work on making dmd faster instead.
> 
> I seem to be the one who feels the most pain by this, it'd be silly of
> me to expect anyone else to work on it.

Recently I've also started feeling the sting of slow compile times.  I
don't know why I didn't notice it before... either I was jaded by C++
compile times in the past and even D's "slower" compile times are fast
by comparison, or maybe dmd performance has degraded over time? It's a
possibility we should investigate.  Or most likely, the recent
templatization of certain parts of druntime and Phobos has exacerbated
the problem to the point that it's now very noticeable.  The recent
fiasco with __switch and `import std.format` come to mind.

While currently all the fingers seem to be pointing at templates, I have
to say that I'm a big fan of templated code, and would rather see an
improvement in how the compiler deals with templates, than a reduction
in the usage of templates. Some of D's key selling features being
templates and meta-programming, how they are implemented is pretty
important.


T

-- 
Береги платье снову, а здоровье смолоду. 


More information about the Digitalmars-d mailing list