Live data from Hacker News

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

twitter.com

61–70 of 120 posts

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

#61
post #57

Yes, but it supports only a fraction of the architectures that binutils supports and I usually don’t recompile Chrome every day. ¯\_(ツ)_/¯

That's not for you then, but some people have to rebuild Chrome-scale programs dozens of times a day, and mold is created for such people.

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

#62
post #59
post #55

Earlier quoted context omitted.

I want to write a book about linkers so that the knowledge I earned during the development of the lld and mold linkers wouldn't lost, but I don't have enough time to do that!

> I want to write a book about linkers so that the knowledge I earned during the development of the lld and mold linkers wouldn't lost, but I don't have enough time to do that! I know this is a type, but it is interesting to see knowledge as a score or commodity you can "earn".

I'm just not a native English speaker.

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

#63
post #59
post #55

Earlier quoted context omitted.

I want to write a book about linkers so that the knowledge I earned during the development of the lld and mold linkers wouldn't lost, but I don't have enough time to do that!

> I want to write a book about linkers so that the knowledge I earned during the development of the lld and mold linkers wouldn't lost, but I don't have enough time to do that! I know this is a type, but it is interesting to see knowledge as a score or commodity you can "earn".

> I know this is a type

( ͡° ͜ʖ ͡°)

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

#64
post #2

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

Looking further into the future and the advent of io_uring in Linux, would you consider special-casing Linux IO ops to use io_uring or do you not expect any speedup there?

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

#65
post #48

A linker seems like it ought to be a simple piece of software. What is a linker doing that takes so long?

Well at a minimum it has to load into RAM all the built objects, which probably include debugging symbols. For something like Chrome, thats probably 20 Gigs...

Huh? Isn't the output of the linker roughly the same size as the sum of the inputs?

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

#66
post #24

Earlier quoted context omitted.

What's wrong with the current agpl license, especially for a linker?

Corporations don't understand the GPL and how isolated, unmodified tools aren't viral.

That sounds strange. Corporations hire enough lawyers to find every possible loophole in tax evasion.

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

#68

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

Individual compilation units (ex: .o files built from .c files) hold references (ex: from .h files) to other compilation units. In order to assemble a full executable, a linker takes all these individual units and links them together.

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

#69
post #2

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

Looking further into the future and the advent of io_uring in Linux, would you consider special-casing Linux IO ops to use io_uring or do you not expect any speedup there?

I'm not sure if io_uring can improve mold's performance, as it has to access random locations while copying file contents to apply relocations. Currently, we mmap all input files and an output file and use memcpy to copy file contents.

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

#70
post #65

Earlier quoted context omitted.

Well at a minimum it has to load into RAM all the built objects, which probably include debugging symbols. For something like Chrome, thats probably 20 Gigs...

Huh? Isn't the output of the linker roughly the same size as the sum of the inputs?

> Huh? Isn't the output of the linker roughly the same size as the sum of the inputs?

No. Linkers today even do link-time code generation. Debug info is gargantuan and can be kept as separate files too.

Post reply on HN