What happened to phobos compile time?

Andrei Alexandrescu SeeWebsiteForEmail at erdani.com
Tue Aug 4 14:22:14 UTC 2020

On 8/4/20 12:41 AM, Mathias LANG wrote:
> On Tuesday, 4 August 2020 at 03:54:53 UTC, RazvanN wrote:
>> Hello everyone!
>> I just tried compiling phobos on machine to get updated with the 
>> latest changes and I noticed an explosion in compile time. On my 
>> machine it takes roughly 5 minutes (!!!) to compile it while last year 
>> it took somewhere around 15-30 seconds. Does anyone know what has 
>> caused this serious performance regression?
>> Thanks for answers,
>> RazvanN
> Welcome to the wonderful world of DMD inliner, we hope you enjoy your stay.
> ```
> $ make -f posix.mak -j8  88.90s user 0.89s system 99% cpu 1:30.25 total
> $ git show HEAD | head -n 5
> commit 2f0ea3fdedc2889b63f266de908cb8658ce98ec9
> Author: Walter Bright <walter at walterbright.com>
> Date:   Tue Jul 21 01:12:35 2020 -0700
>      sha: inline critical functions
> $ git checkout HEAD^
> Previous HEAD position was 2f0ea3fde sha: inline critical functions
> HEAD is now at e364edfc8 Merge pull request #7561 from 
> WalterBright/fabs-float
> $ make -f posix.mak -j8  9.42s user 0.55s system 98% cpu 10.128 total
> ```

That's a large penalty. I hope at least the debug build hasn't been 

I recall the change was made to get performance parity with gdc and ldc 
for the sha code. So I wonder (a) how the resulting performance of the 
sha functions compares with those, and (b) how long it takes to build 
phobos with gdc and ldc.

More information about the Digitalmars-d mailing list