Increasing D Compiler Speed by Over 75%

Rainer Schuetze r.sagitario at gmx.de
Wed Jul 31 14:24:37 PDT 2013



On 31.07.2013 09:00, Walter Bright wrote:
> On 7/30/2013 11:40 PM, dennis luehring wrote:
>> currently the vc builded dmd is about 2 times faster in compiling
>
> That's an old number now. Someone want to try it with the current HEAD?
>

I have just tried yesterdays dmd to build Visual D (it builds some 
libraries and contains a few short non-compiling tasks in between):

Debug build dmd_dmc: 23 sec, std new 43 sec
Debug build dmd_msc: 19 sec, std new 20 sec

"std new" is the version without the "block allocator".

Release build dmd_dmc: 3 min 30, std new 5 min 25
Release build dmd_msc: 1 min 32, std new 1 min 40

The release builds use "-release -O -inline" and need a bit more than 1 
GB memory for two of the libraries (I still had to patch dmd_dmc to be 
large-address-aware).

This shows that removing most of the allocations was a good optimization 
for the dmc-Runtime, but does not have a large, but still notable impact 
on a faster heap implementation (the VS runtime usually maps directly to 
the Windows API for non-Debug builds). I suspect the backend and the 
optimizer do not use "new" a lot, but plain "malloc" calls, so they 
still suffer from the slow runtime.


More information about the Digitalmars-d-announce mailing list