Profiling DMD's Compilation Time with dmdprof

Manu turkeyman at gmail.com
Sat Nov 17 06:21:20 UTC 2018


On Thu, Nov 15, 2018 at 8:00 PM Vladimir Panteleev via
Digitalmars-d-announce <digitalmars-d-announce at puremagic.com> wrote:
>
> On Thursday, 15 November 2018 at 19:18:27 UTC, Manu wrote:
> > I'm not sure how VisualStudio (read: MSBuild) should behave
> > differently than make?
> > It's not like the build script is taking a long time, it's the
> > invocation of DMD that takes 100% of that time.
>
> That seems to take about half the time for me (2 out of the 4
> seconds).
>
> > 36% slower seems highly optimistic? Perhaps you're building a
> > debug build of DMD with a debug build of DMD? I guess that
> > wouldn't be so slow... I suspect it's the optimiser that's very
> > slow?
>
> 36% slower for compiling a real-life program with the built D
> compiler. The comparison is between a normal and debug build of
> DMD (used to build the program).

What was the batch size for module grouping? I wonder if batching too
many modules together into a single compiler invocation makes too much
data for the optimiser? Is optimisation time strictly linear with the
size of the AST? Or is having more functions available for the inliner
to consider increasingly expensive?


More information about the Digitalmars-d-announce mailing list