3 ms·
Does LTO allow the exact same optimization opportunities as unity builds with all static functions? I remember reading that unity builds still result in more op
by matheusmoreira 3y ago
Does LTO allow the exact same optimization opportunities as unity builds with all static functions? I remember reading that unity builds still result in more optimized code. SQLite amalgamation comes to mind.
https://www.sqlite.org/amalgamation.html https://www.sqlite.org/amalgamation.html
> And because all code is in a single translation unit, compilers can do better inter-procedure and inlining optimization resulting in machine code that is between 5% and 10% faster.
- dundarious 3y agoIn all likelihood, LTO will always be a strict subset of what you can get from a unity build, in terms of optimization, because it requires additional work to implement. It may be/become very very close, though. I prefer to use unity builds for various reasons.