Get the latest tech news
Link Time Optimizations: New Way to Do Compiler Optimizations
Traditional compilation-linking cycle generates binaries that work fine, but in case you need more speed, you need to learn about link time optimizations. Here we talk about what link time optimizations are, how to enable them and what improvements to expect.
A discovery that there is GCC compiler offers -O0 optimization lever for regular debugging and -O3 for fast release code will be one of the moment I will never forget. Also, total compilation time with LTO enabled is longer and I think it is one of the reasons why we haven’t seen its wide adoption (developers are not patient people). What I assume to have happened is that ffmpeg has already been highly optimized for speed; the developers moved all the small functions into headers so they can be easily inlined by the compiler.
Or read this on Hacker News