Link Time Optimization

Discussions focus on link-time optimization (LTO), linkers such as lld, mold, and GCC, including enabling options, performance impacts, and build process configurations.

➡️ Stable 0.6x Programming Languages
2,383
Comments
19
Years Active
5
Top Authors
#2571
Topic ID

Activity Over Time

2008
4
2009
6
2010
19
2011
25
2012
33
2013
45
2014
87
2015
74
2016
116
2017
169
2018
135
2019
163
2020
215
2021
210
2022
279
2023
269
2024
233
2025
289
2026
12

Keywords

e.g LIB ARM LTO MDIL flapenguin.me b.cpp STONES ABI LLVM linker optimization link lto linking library symbols compiler compilers identifiers

Sample Comments

saagarjha Jul 31, 2019 View on HN

Yeah, isn't this just link-time optimization?

NilsIRL Feb 10, 2020 View on HN

Link time optimization is possible with GCC.

vhbit Aug 14, 2015 View on HN

Yep, it's possible to enable link time optimizations.

generalenvelope Dec 26, 2024 View on HN

What linker are you using? I've gotten really significant speedup over the default linker by using lld or mold.

ftrobro Apr 23, 2024 View on HN

I assume it could be or is part of link time optimization when compiling an application rather than a library?

salawat Feb 27, 2022 View on HN

It's trivial if you compile from source and onow how to massage the linker!

jcelerier Jul 27, 2023 View on HN

In the end it's the compiler which is being called by the linker to perform LTO, 99% of the time will be spent there

loeg Aug 21, 2023 View on HN

No good reason. It would just require something fiddly with the linker / build process. This is good enough.

goalieca Nov 20, 2019 View on HN

Link time inlining would solve this.

igorkraw Dec 15, 2021 View on HN

Anyone know the state of link time optimisation on this? Last time I checked it was advised to use this for dev builds only