mold: A Parallel Linker That Links Multi-Gigabyte Binaries in Under a Second

Linking is a critical step in the software build process, yet it remains a bottleneck, especially for large C++ programs. Existing linkers exploit limited parallelism, leaving CPU cores idle. This paper presents mold, a Unix/Linux linker that applies data parallelism across the entire linking pipeline. By decoupling symbol resolution and archive processing, mold achieves 2.4–16.1x speedup over lld and up to 112x over GNU ld, linking multi-gigabyte debug binaries in seconds. An ablation study shows the speedup comes from cumulative parallelization, not a single optimization.
mold links multi-gigabyte debug binaries in at most a few seconds, and often in under a second.
- gabeochoa
Old tweet from Rui, but I saw it in a recent zig video and really liked the sentiment:
(https://x.com/rui314/status/1560277403787997185)
> my strategy is to increase the value of commons by, say, 100 and get 1 as a return, so bear with me. If you want to use mold for free, you can just do that. This is my open-source business strategy.
Wishing the best for Mold and Rui
- dochtman
Wild is a decent bit faster than mold at this point:
https://github.com/wild-linker/wild
(Benchmarks in the README.)
- lrvick
We use mold as the default linker in the Stagex linux distribution. It shaved hours off our full tree build time.