Live data from Hacker News

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

twitter.com

11–20 of 120 posts

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

#11
post #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.

Rui has made it explicit that a commercial license is available. Hey Rui, you should replace "please call" with a dollar amount in order to increase your conversion rate ;)

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

#13
post #2

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

I see mold does not yet support LTO [1]. But if it were to, could we still expect performance gain over lld when doing LTO?

[1] https://github.com/rui314/mold/issues/181

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

#14
post #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.

Rui has made it explicit that a commercial license is available. Hey Rui, you should replace "please call" with a dollar amount in order to increase your conversion rate ;)

I dislike "contact us for pricing" too, but pricing is hard! I don't know how much I should ask for. This is also a bit unusual business model because mold can be used for free. I'm happy if users pay me 10%-20% of the total cost they could save by using mold though.

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

#15
post #2

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

I see mold does not yet support LTO [1]. But if it were to, could we still expect performance gain over lld when doing LTO? [1] https://github.com/rui314/mold/issues/181

mold does support LTO. It's not faster or slower than lld both in terms of link speed and the output binary's speed.

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

#18
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? :)

Someone was supposed to make llvm-dsymutil use the lld code, but that didn't happen.

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

#19
post #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.

I wish basic toolchain changes happened faster though. Regular ld is still the default on most Linux dists.

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

#20
post #7
post #6

Earlier quoted context omitted.

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…

Note that recent lld is also multithreaded, and with tweaks, can be faster than mold at low core counts: https://bugzilla.mozilla.org/show_bug.cgi?id=1746462#c2
Post reply on HN