Live data from Hacker News

Mold/macOS is 11 times faster than the Apple's default linker to link Chrome

twitter.com

1–10 of 120 posts

Re: Mold/macOS is 11 times faster than the Apple's default linker to link Chrome

#5
post #3
post #2

Author here. If you have any questions about mold/macOS, feel free to ask me as a reply.

Can mold also serve as a replacement for dsymutil (i.e. linking DWARF info)? If not, any plans to support this in the future? :)

I haven't thought about that that much, but it looks like dsymutil is a companion command of a linker, so the answer is probably yes, but I need to investigate it further to give you a concrete answer.

Re: Mold/macOS is 11 times faster than the Apple's default linker to link Chrome

#7
post #6
post #2

Author here. If you have any questions about mold/macOS, feel free to ask me as a reply.

Why is it so much faster?

The biggest reason is because it is multi-threaded. When building a program, the compilation step is parallelized (the build system invokes a compiler for each source file), but the final link step is not. So it is important to make the linker itself multi-threaded.

But even without multi-threading, mold is still faster than other linkers. I can think of various reasons why, but I don't know which attributes how much. I believe the biggest contributor is its efficient data structure -- it is hard to make program faster by writing fast code, but it can naturally be achieved by designing efficient data structures. That said, it is hard to compare two or more programs to find out why one program is faster than the others unless their designs are similar.

Re: Mold/macOS is 11 times faster than the Apple's default linker to link Chrome

#9
Apple and Microsoft should really throw some money at Rui; Mold is a massive improvement to developer experience, and the sooner it's ported to their platforms the better.

I find myself defaulting to Linux for Rust development these days, mostly because Mold makes the inner loop of development so much faster.

Re: Mold/macOS is 11 times faster than the Apple's default linker to link Chrome

#10

20 seconds down to 2 seconds is a huge achievement. I'll still be telling my boss I'm waiting for a build while I go for my 15 minute coffee, though

If it takes 20 seconds, you go for a coffee or switch the window to start web browsing, but if it takes only 2 seconds, you can wait without being distracted. So it's more than just saving 18 seconds for each build. It wouldn't interrupt your flow.
Post reply on HN