What happened to phobos compile time?

H. S. Teoh hsteoh at quickfur.ath.cx
Tue Aug 4 22:24:51 UTC 2020


On Tue, Aug 04, 2020 at 10:13:02PM +0000, Patrick Schluter via Digitalmars-d wrote:
> On Tuesday, 4 August 2020 at 12:42:04 UTC, Steven Schveighoffer wrote:
[...]
> > Looking at uses of those functions I get a total of 80 uses.
> > Considering the compile time goes from 12 seconds on my system to 92
> > seconds, that's a full second to inline each call. Something doesn't
> > add up, it can't be that bad.
> > 
> 
> Instruction cache thrashing. The bane of overzealous inlining and code
> geenration.

But this is a problem with long *compile* times, not long runtimes.
Something screwy is going on inside dmd.

Then again, I never fully trusted dmd's inliner... it has been a source
of nasty codegen bugs in the past, like wrong-code bugs that appear when
you compile with -O -inline but disappear when you omit either or both
options.

As someone has said, if you care about runtime performance, don't bother
with dmd, use ldc or gdc.  Dmd is really only useful for lightning fast
compile times; if even that has gone out the window, then I've just
about lost all reasons to use dmd at all.


T

-- 
"Computer Science is no more about computers than astronomy is about telescopes." -- E.W. Dijkstra


More information about the Digitalmars-d mailing list