Linking is the slowest part of D's compilation process– can we use mold to speed it up?

deadalnix deadalnix at gmail.com
Fri Feb 26 02:26:32 UTC 2021


On Friday, 26 February 2021 at 01:52:04 UTC, Walter Bright wrote:
> On 2/24/2021 3:53 PM, deadalnix wrote:
>> This is true for a fresh build, but often not the case for 
>> incremental builds, which dev often have to go through. This 
>> is because the work you have to do for sources grows with the 
>> size of the changeset, while the work you have to do link 
>> grows with the size of the project as a whole, changed or not. 
>> On large projects, it is very common that linking dominates 
>> incremental builds.
>> 
>> zld is another interesting project that tries to do enable 
>> incremental linking: https://github.com/kubkon/zld
>> 
>> Just like mold, it is fairly new and probably not battle 
>> tested enough for production yet.
>
> Optlink could do a full link faster than MS-Link could do an 
> incremental link.

That is also the position of the mold guy. He think that the 
extra work to do incremental linking offset the gains so decided 
to not even try to do it.

Hard to know which is right.


More information about the Digitalmars-d mailing list