On Sun, Apr 27, 2014 at 7:41 AM, "C. Bergström" <[email protected]> wrote: > On 04/27/14 06:23 PM, Rich Freeman wrote: >> And yet, in the same paragraph you mention -O3, which is tantamount to >> just setting a flag and walking away. That turns on 14 things you >> probably don't really need. > > I was trying to give a simplified example... no need to nitpick my reply > (Every compiler defines -O3 differently and even the flag to unroll loops > and that threshold may be different.. ...)
Sorry if it came across aggressively. I was just pointing out that the reason one sets CFLAGs generically is to avoid the trouble of "optimizing the optimizer." This always comes at a cost - I tend to use -Os, but no doubt some packages would benefit from a different global optimization, let alone specific optimizations. That was just the point I wanted to make about LTO - I think it is of general usefulness since it has the potential to help, and rarely hurts. The only problem with it is that the implementation is immature. > > Can you name a single package that you use which receives a measurable > benefit from LTO? (Just asking) Alas, I cannot. There are some general benchmarks out there, and they seem to vary from little to no effect to significant. More CPU-intensive software seems the most likely to benefit. No doubt the benefits of LTO will improve as it matures. Rich
