From: Wilco Dijkstra <Wilco.Dijkstra@arm.com>
To: "H.J. Lu" <hjl.tools@gmail.com>
Cc: 'GNU C Library' <libc-alpha@sourceware.org>,
Adhemerval Zanella <adhemerval.zanella@linaro.org>
Subject: [PATCH v2] string: Add support for __memsetzero on all targets
Date: Thu, 10 Feb 2022 14:25:46 +0000 [thread overview]
Message-ID: <AS8PR08MB6534C6694214EB8B45786B6D832F9@AS8PR08MB6534.eurprd08.prod.outlook.com> (raw)
Hi,
So as far as I can see the main justification for this is a specific issue in some
(one?) x86 microarchitecture. It's not clear to me that this will benefit other
targets enough to be worth the effort - again at best you avoid executing
one instruction per memset call. That was a big thing on in-order cores
decades ago, but today that's hard to measure.
Another issue is that unlike __memcmpeq, the default scenario is that most
targets will actually see a slowdown. Once compilers emit __memsetzero,
one will be forced to provide an efficient target implementation just to
avoid this slowdown. So I don't see how this helps improve GLIBC.
Cheers,
Wilco
next reply other threads:[~2022-02-10 14:26 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-10 14:25 Wilco Dijkstra [this message]
-- strict thread matches above, loose matches on Subject: below --
2022-02-09 16:11 H.J. Lu
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=AS8PR08MB6534C6694214EB8B45786B6D832F9@AS8PR08MB6534.eurprd08.prod.outlook.com \
--to=wilco.dijkstra@arm.com \
--cc=adhemerval.zanella@linaro.org \
--cc=hjl.tools@gmail.com \
--cc=libc-alpha@sourceware.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).