50% slowdown when compiling / linking using GCC with LTO

Troy Heron troy.heron@hixxy.org
Mon Nov 25 05:31:00 GMT 2013


I'm experiencing a 50% slowdown with some code I'm working on when
compiling with LTO enabled using gcc version 4.8.1 (Ubuntu/Linaro
4.8.1-10ubuntu8)  (in C++).

Another past post suggested compiling with -pg and checking LTO and
non-LTO builds with gprof, but gcc doesn't seem to want to output a
gmon.out. This is the first thing I'd like to solve?

I have since profiled the program with callgrind, and am unable to see
what could possibly be causing this kind of slowdown. I have
modularised the code into separate translation units in such a way
that I was anticipating being able to use LTO to improve performance.
This is a bit of a blow for me that it is not achieving this purpose,
but actually degrading performance.

Kind regards,

More information about the Gcc-help mailing list