What happened to phobos compile time?
Patrick Schluter
Patrick.Schluter at bbox.fr
Tue Aug 4 22:13:02 UTC 2020
On Tuesday, 4 August 2020 at 12:42:04 UTC, Steven Schveighoffer
wrote:
> On 8/4/20 12:41 AM, Mathias LANG wrote:
>> [...]
>
> Looking at that change, a few functions were force-inlined.
> Most of them were trivial.
>
> And I don't think these are ones that are used in a lot of
> places. Phobos is compiled all-at-once. So you can't explain
> the slowdown by multiple instances of compilation.
>
> Has anyone profiled to see where the slowdown is? If I remove
> the pragma(inline) from the two functions T_SHA2_0_15 and
> T_SHA2_16_79, the compile time comes back to normal.
>
> 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.
More information about the Digitalmars-d
mailing list