Live data from Hacker News

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

twitter.com

41–50 of 120 posts

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

#41
post #40
post #38

Earlier quoted context omitted.

I don't have a plan, and that's not what I can plan. They can plan in theory, but I believe that's very unlikely to happen.

if mold has multiple advantages over the official ones and no drawback, can't you send them an RFC once mold reaches 1.0?

None of gold, lld or mold can replace GNU ld entirely because they don't cover all features that GNU ld has.

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

#42
post #32
post #29

Great achievement, does it support all deployment targets, build configurations for Swift and Objective-C?

mold/macOS aims to be a drop-in replacement for the Apple's ld. I don't think it supports all the feature you mentioned already, as it is still pre-Alpha. But we are working on it to make it "just work".

Thanks for the clarification.

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

#43
>> Why is time spent on System is so much higher than the other one even though that one takes longer?

> Good question but I don't know the answer.

Don’t know if that’s the final answer here (didn’t actually investigate), but system is the time spent in syscalls, and locks are usually provided by the OS, aka syscalls (though there might be userland components to avoid the syscall e.g. futex).

Thus the need for synchronisation of threaded program generally leads to higher system time. Though here mold is clearly a lot more efficient as well (lower user time).

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

#44

How do I learn about what’s being discussed here? Why do I need a linker?

To assemble executable code from separately compiled files. Or to tell your executable code from where other executable code it needs can be loaded at runtime.

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

#45

How do I learn about what’s being discussed here? Why do I need a linker?

John R. Levine’s book Linkers and Loaders remains the only comprehensive coverage on the topic. You can get the manuscript proofs for free on the author’s website:

https://www.iecc.com/linker/

The Solaris Linkers and Libraries docs are very good and mostly relevant to Linux, with fewer distractions about Windows:

https://docs.oracle.com/cd/E37838_01/html/E36783/index.html

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

#46
I’ve always been more attracted to the higher level languages and followed llvm from a compiler interest. So I know the principles, but I would like to understand more. Especially related to cross compilation.

Does someone have a source explaining the state of the art? With all the different compilers, gcc, clang and the different flavours of linkers: ld, lld, mold, gold, ?

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

#47
post #30
post #22

Earlier quoted context omitted.

I sort of wish Apple, Amazon, Google, Microsoft and Facebook all contribute $200K each and say hey can you now make Mold MIT or BSD.

$200K is nowadays an annual total compensation of a junior dev. I believe mold values much more than a one year outcome of a typical 5-person junior dev team.

> $200K is nowadays an annual total compensation of a junior dev

*in the US.

In my country, those salaries are completely unheard of.

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

#49
post #40
post #38

Earlier quoted context omitted.

I don't have a plan, and that's not what I can plan. They can plan in theory, but I believe that's very unlikely to happen.

if mold has multiple advantages over the official ones and no drawback, can't you send them an RFC once mold reaches 1.0?

Read the readme. Full compatibility with gold/lld is a non-goal and will significantly slow down the linker IIUC.

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

#50
post #47
post #30

Earlier quoted context omitted.

$200K is nowadays an annual total compensation of a junior dev. I believe mold values much more than a one year outcome of a typical 5-person junior dev team.

> $200K is nowadays an annual total compensation of a junior dev *in the US. In my country, those salaries are completely unheard of.

In my country, $200k is what a senior dev makes in 10 years. The issue is, I very much doubt people like Rui could be expected to live in places like mine. So comparing against US salaries is probably what you should do anyway.
Post reply on HN