On 26 February 2018 at 07:11, Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> wrote:
On Mon, Feb 26, 2018 at 05:24:28AM +0100, Kevin Kofler wrote:
> Zbigniew Jędrzejewski-Szmek wrote:
> > But size is easy:
> > $ du -s /var/tmp/inst-O*
> > 74428 /var/tmp/inst-O3
> > 56136 /var/tmp/inst-O3-lto
> > 61992 /var/tmp/inst-Os
> > 43572 /var/tmp/inst-Os-lto
>
> The current default is -O2, not -O3, though.

Heh, I'm a bit surprised:

74428    /var/tmp/inst-O3
56136    /var/tmp/inst-O3-lto
61992    /var/tmp/inst-Os
43572    /var/tmp/inst-Os-lto
71268    /var/tmp/inst-O2
50276    /var/tmp/inst-O2-lto
47928    /var/tmp/inst-O0
32688    /var/tmp/inst-O0-lto

So... I'd say that lto *does* give a measure benefit.
(Note, it's all unstripped.)

Looking only on total file size is not proper method checking code size.
Especially such method may be totally misleading if binaris are not stripped.
Can you repeat above and show output of the command "size /var/tmp/inst-*"?

kloczek
-- 
Tomasz Kłoczko | LinkedIn: http://lnkd.in/FXPWxH