From: unlvsur unlvsur <unlvsur@live.com>
To: unlvsur unlvsur via Libstdc++ <libstdc++@gcc.gnu.org>,
unlvsur unlvsur via Libstdc++ <libstdc++@gcc.gnu.org>
Subject: RE: An interesting "optimization"? for __glibcxx_assert under verbose mode
Date: Fri, 15 Oct 2021 00:40:52 +0000 [thread overview]
Message-ID: <DM6PR05MB46974F68662CFAA17FC82F0AD6B99@DM6PR05MB4697.namprd05.prod.outlook.com> (raw)
In-Reply-To: <DM6PR05MB4697BDBFFA738E02374B6301D6B99@DM6PR05MB4697.namprd05.prod.outlook.com>
This is a better example that can show the benefit
https://godbolt.org/z/aPo95Eb3P
https://godbolt.org/z/Wd4nev8eh
Sent from Mail<https://go.microsoft.com/fwlink/?LinkId=550986> for Windows
From: unlvsur unlvsur<mailto:unlvsur@live.com>
Sent: Thursday, October 14, 2021 20:30
To: unlvsur unlvsur via Libstdc++<mailto:libstdc++@gcc.gnu.org>
Subject: An interesting "optimization"? for __glibcxx_assert under verbose mode
I think the parameter can be just embedded in the symbol name of the function. This improves code gen and make optimizers happier under -Os.
But it only works under C++20.
This is a proven concept. It works for both gcc and clang
https://godbolt.org/z/s35s8MTac
https://godbolt.org/z/5KK5PzMEj
Os:
https://godbolt.org/z/4MjGdTajf
https://godbolt.org/z/crfWf41vc
Sent from Mail<https://go.microsoft.com/fwlink/?LinkId=550986> for Windows
prev parent reply other threads:[~2021-10-15 0:40 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-15 0:30 unlvsur unlvsur
2021-10-15 0:40 ` unlvsur unlvsur [this message]
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=DM6PR05MB46974F68662CFAA17FC82F0AD6B99@DM6PR05MB4697.namprd05.prod.outlook.com \
--to=unlvsur@live.com \
--cc=libstdc++@gcc.gnu.org \
/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).