Linking is the slowest part of D's compilation process– can we use mold to speed it up?
deadalnix
deadalnix at gmail.com
Wed Feb 24 23:53:34 UTC 2021
On Wednesday, 24 February 2021 at 22:12:46 UTC, Atila Neves wrote:
> On Tuesday, 23 February 2021 at 14:41:59 UTC, James Lu wrote:
> The linker can be a bottleneck, yes, especially since it
> doesn't do work in parallel. But in my experience, if the
> linker takes a while, compiling took a lot longer still. Of
> course, any improvements in this area are welcome, and I hope
> mold is production-ready as soon as possible.
>
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.
More information about the Digitalmars-d
mailing list