Mold linker v1.0 released

There's a new linker in town, Mold linker v1.0. It's selling point is speed, much much better speed when linking big binaries (if its own benchmarks are true). It's designed to be a drop-in replacement for GNU gold and LLVM lld. It's author is also the original author of LLVM's lld linker.

So if this benchmark is true, the author beats his former puppy LLVM lld by factor 3 up to 5 times faster.

Program (linker output size)GNU goldLLVM lldmold
Chrome 96 (1.89 GiB)53.86s11.74s2.21s
Clang 13 (3.18 GiB)64.12s5.82s2.90s
Firefox 89 libxul (1.64 GiB)32.95s6.80s1.42

So far no word about FreeBSD, but it might be interesting enough for some people to have a closer look at. Architecture: ARM64, x64. License: Affero GPLv3.

 
I wonder if someone uses mold linker in the latest FreeBSD. Can it be used for linking after buildworld and buildkernel?
Latest benchmarks in the git repo are even better:

1720965357682.png


A new -separate-debug-file option leads to even faster linking
 
I can attest that mold is really fast, but I only used it briefly on smaller projects for development. IIRC there was a serious problem on FreeBSD that made it produce invalid binaries. That should be fixed by now, still I'd be a bit cautious to apply it widely in production.
 
Back
Top