One of the main features of LLD, the LLVM Linker, is its high performance, frequently outperforming existing linkers by a substantial margin. In this presentation we'll take a look at why this might be? Starting with a brief description of the linker and what it must do, we'll look at how LLD approaches the problem, compare and contrast with other open source linkers and see how it performs on a selection of programs. We'll conclude by looking at what you might be able to take from LLD's architecture, implementation, and development into your own programs.
LLD (https://lld.llvm.org/) is a drop in replacement for system linkers such as GNU ld and link.exe. Since LLVM release 4.0 it has been available in the official release. Speed of linking is especially important in large projects where a single change in an object file can result in minutes of link time. On a fast machine can bring the link time of even large projects like Chrome and Clang under a minute on a fast machine, permitting developers to iterate on their changes more rapidly.
All linkers have the same basic job, find and load all the object files and libraries that will form the output, lay the contents out in order, write the combined output. In many ways a glorified form of cat. There is no single reason why LLD is faster than other linkers, it is a combination of architectural and implementation factors as well as a focus on performance by the projects maintainers. In some cases these factors will only pertain to linking but in many cases they will generalize to similar projects.
The intended audience for this talk is made up of: - People interested in learning more about the linking process. - Software developers interested in performance of batch programs that deal with a large input size.
Knowledge of C++ for the implementation aspects will be helpful.
Speakers: Peter Smith