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