Closed springmeyer closed 6 years ago
Ideally as part of this effort we also document an exact, measurable situation when LTO actually helps.
Never did this. Still worthwhile. The reason I merged without doing a perf validation benchmark is that:
fsanitize=cfi
which requires it
For projects that use node-cpp-skel and end up having lots of .cpp files, LTO starts to become potentially important for best performance per https://github.com/mapbox/cpp/blob/master/glossary.md#link-time-optimization.
This ticket tracks getting an LTO example working in node-cpp-skel that other modules can follow. This is worthwhile but a little hairy since it requires:
Ideally as part of this effort we also document an exact, measurable situation when LTO actually helps. Having it help performance in theory is not worth the setup overhead, so we'll want to have a clear demonstration it helps perf. Although one caveat is that we should likely investigate using
-fsanitize=cfi
in production in the future and that requires LTO: (https://blog.trailofbits.com/2016/10/17/lets-talk-about-cfi-clang-edition/ and https://clang.llvm.org/docs/ControlFlowIntegrity.html).Related: