From: LIU Hao <lh_mouse@126.com>
To: Xi Ruoyao <xry111@xry111.site>,
Licht Martin Werner <martin.licht@epfl.ch>,
gcc-help@gcc.gnu.org
Subject: Re: Do definitions in headers still help optimization?
Date: Sat, 13 Jan 2024 01:58:11 +0800 [thread overview]
Message-ID: <a410824b-058d-44f1-ba5f-99254f610c77@126.com> (raw)
In-Reply-To: <249ffe7cb9e4a4930fe4c489c8605acb4bcabfcc.camel@xry111.site>
[-- Attachment #1.1: Type: text/plain, Size: 1071 bytes --]
在 2024/1/13 0:01, Xi Ruoyao 写道:
> And LTO cannot cross shared library boundary. It even cannot cross
> static library boundary if the static library is intended to be
> distributed in binary form: a static library containing LTO bitcode
> will just blow up if attempting to "link" against it using a different
> compiler or even a different version of the compiler. So LTO-enabled
> distros build packages containing static libraries with -ffat-lto-
> objects and then strip the LTO bitcode away from the static libraries.
I don't think that's the case for me. I'm building a shared library against only system libraries.
My observation is basically
1) Link time grows dramatically.
[less than 2 minutes => more than 1 hour]
2) Binary size also grows dramatically.
[1.9 MiB => 9.0 MiB]
3) The overall performance improvement is not worth the cost.
[31382.685 seconds => 29882.761 seconds] (-4.779%)
4) Function calls use much more stack space and are more likely to cause
stack overflows.
--
Best regards,
LIU Hao
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 840 bytes --]
next prev parent reply other threads:[~2024-01-12 17:58 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-12 14:07 Licht Martin Werner
2024-01-12 14:49 ` LIU Hao
2024-01-12 16:01 ` Xi Ruoyao
2024-01-12 17:58 ` LIU Hao [this message]
2024-01-14 10:44 ` Xi Ruoyao
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=a410824b-058d-44f1-ba5f-99254f610c77@126.com \
--to=lh_mouse@126.com \
--cc=gcc-help@gcc.gnu.org \
--cc=martin.licht@epfl.ch \
--cc=xry111@xry111.site \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).