public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Wilco Dijkstra <Wilco.Dijkstra@arm.com>
To: Richard Henderson <richard.henderson@linaro.org>,
	'GNU C Library' <libc-alpha@sourceware.org>
Subject: Re: [PATCH] Replace rawmemchr (s, '\0') with strchr
Date: Sat, 4 Feb 2023 11:38:03 +0000	[thread overview]
Message-ID: <PAWPR08MB8982153689CD7700B7DC1E1783D49@PAWPR08MB8982.eurprd08.prod.outlook.com> (raw)
In-Reply-To: <4514eccc-02fb-91e6-a770-bae744baebc2@linaro.org>

Hi Richard,

> While the compiler does lower the strchr to strlen, why not use that replacement directly?

I'd prefer that and be explicit about what function you're using but like with mempcpy
(which also gets expanded into memcpy+size) there are always people arguing the
opposite... Since we taught the compiler to do the right thing in most of these cases,
it doesn't really matter as it's now syntactic sugar.

Cheers,
Wilco

      reply	other threads:[~2023-02-04 11:38 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-03 13:07 Wilco Dijkstra
2023-02-03 13:43 ` Adhemerval Zanella Netto
2023-02-04  3:19 ` Richard Henderson
2023-02-04 11:38   ` Wilco Dijkstra [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=PAWPR08MB8982153689CD7700B7DC1E1783D49@PAWPR08MB8982.eurprd08.prod.outlook.com \
    --to=wilco.dijkstra@arm.com \
    --cc=libc-alpha@sourceware.org \
    --cc=richard.henderson@linaro.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).