upvote
Mold: A Massively Parallel Linker

(arxiv.org)

This is a wonderful paper that includes many optimization tricks that are generally applicable, including various optimizations that they retrofitted into lld. But I thought there was one meta optimization that was especially interesting (from page 2):

> A new linker's early adopters knowingly accept such differences, which is one reason why drastic improvements tend to come from new linkers rather than existing ones

This is true of many things, not just linkers. I think this is encouraging for people to (re)try things that have already been done, because newcomers are allowed to take risks that established things can't take.

reply
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

reply
Given the passing of nitter, xcancel, etc., thank you for quoting the relevant text.
reply
Wild is a decent bit faster than mold at this point:

https://github.com/wild-linker/wild

(Benchmarks in the README.)

reply
I'm keen to follow along with Wild as their intent is to be incremental, and Zig recently announced incremental linking support. I'm also a fan as its cool to seen an Australian working full time on open source (I'm also Australian)

Edit to add: I think David's talk on Wild [0] is an interesting summary of what a linker is and why its hard to make incremental

[0] https://www.youtube.com/watch?v=WSHt3-gwVxc

reply
Rui mentioned today that he managed to speed up mold "about 1.5 times" while writing this paper https://x.com/rui314/status/2092486965186969699?s=20

Seems that some optimizations went to mold 2.42 and others are not yet released. Wild benchmarked mold 2.40 or 2.41

reply
I guess this sentence from the Wild readme is also relevant:

  Mold is already very fast, however it doesn't do incremental linking and the author has stated that they don't intend to.
reply
Excellent (pardon the pun!) link! :-)
reply
We use mold as the default linker in the Stagex linux distribution. It shaved hours off our full tree build time.
reply
Would use this at a fairly large company if we had windows and Mac support, probably could get budget to pay for the features it’s missing.
reply
That sounds like you should get in contact with Rui Ueyama. If anybody asks, someone on HN said it seemed like a no-brainer.
reply