4 ms·
FWIW, the author is also the original author of LLVM's "lld" linker, and has written multiple C compilers. That makes them the author of both of the two fastes
by gavinray 5y ago
FWIW, the author is also the original author of LLVM's "lld" linker, and has written multiple C compilers.
That makes them the author of both of the two fastest linkers in existence, AFAIK. This person has a very impressive resume.
https://github.com/rui314/mold/blob/main/docs/design.md https://github.com/rui314/mold/blob/main/docs/design.md
> "Concretely speaking, I want to use the linker to link a Chromium executable (~1.8 GiB in size) just in 1 second. LLVM's lld, the fastest open-source linker which I originally created a few years ago, takes about 12 seconds to link Chromium on my machine. So the goal is 12x performance bump over lld. Compared to GNU gold, it's more than 50x."
There is good discussion as well in this prior post, and Reddit thread with the author in it a while back:
https://news.ycombinator.com/item?id=26233244 https://news.ycombinator.com/item?id=26233244
https://www.reddit.com/r/cpp/comments/kxvw5c/mold_a_modern_linker/ https://www.reddit.com/r/cpp/comments/kxvw5c/mold_a_modern_l...
- wyager 5y agoWhy is Chromium so huge?
- tomcam 5y agoWhat would you do to shrink it?
- wyager 5y agoThat would require me knowing the answer to the question I asked.
- rackjack 5y agoThis might be a nerd-sniping question because there are lots of reasons and people will fight over which ones are most relevant. e.g. V8, rendering, myriad web protocols, security measures, etc. From my understanding at least.
- glandium 5y agoDebug info is huge.
- mrich 5y agoAre they using split dwarf? This avoids linking the debug info.
- simlevesque 5y agoBack when I was using Gentoo, Chromium was the biggest dependency on my machine, by far. When there was an update I couldn't use my machine for like 30 minutes.
- IshKebab 5y agoIt includes a mountain of stuff. Think of all the web APIs that exist.
- jart 5y agoRui Ueyama is one of the most interesting coders of our age. chibicc in particular is one of the loveliest projects I've seen. I found it so captivating that when it got posted to HN last year I dropped what I was doing for a month just to hack on it. It's rare to find codebases with enough clarity to be educational. I learned so much reading his chibicc code. For example, in a world where the orthodox solution to these kinds of things is to use Bison or Antlr, the thought never would have occurred to me before that writing a parser in C could be so easy. That's how I was able to write an assembler for it. Rui is also living proof that the will and motivation to simplify also generalizes to the ability to create production-quality tools with superior performance, as evidenced by Mold. Very exciting to see his work take off.
- gavinray 5y agoThis is some high praise coming from Justine Tunney.
- rurban 5y agoYeah, but he refused to protect his unicode identifiers, and just went with the C committee solution to provide no solution to Unicode identifier security. I expected better.
- rui314 5y agoAre you confusing me with someone else? I have no idea what you are talking about.
- jart 5y agoHe's probably talking about https://justine.lol/dox/ansic-identifiers.txt https://justine.lol/dox/ansic-identifiers.txt I'm not sure what he wants to see happen here but I remember him asking me for a timing safe memcmp function in Cosmopolitan a while back and it's hard to refuse a small reasonable demand.
- saurik 5y agoI feel like this makes it even more confusing as to why this "drop-in replacement" is yet another new competing project rather than an upgrade/enhancement to an existing linker (such as lld)... has open source as a community concept failed so hard that people are unable to even contribute to and collectively improve projects they themselves started?