From: Wilco Dijkstra <Wilco.Dijkstra@arm.com>
To: Noah Goldstein <goldstein.w.n@gmail.com>
Cc: Adhemerval Zanella Netto <adhemerval.zanella@linaro.org>,
James Tirta Halim <tirtajames45@gmail.com>,
"libc-alpha@sourceware.org" <libc-alpha@sourceware.org>
Subject: Re: [PATCH] strcasestr: check if ne[0] is in hs with strchr or strpbrk as does strstr
Date: Tue, 17 Oct 2023 09:57:53 +0000 [thread overview]
Message-ID: <PAWPR08MB898201AB6B2F497940B7267183D6A@PAWPR08MB8982.eurprd08.prod.outlook.com> (raw)
In-Reply-To: <CAFUsyfKURzOt5tn4rxGohpyrjtS6eR082a8Q2KTfgXjdRSLg5Q@mail.gmail.com>
Hi Noah,
>> I ran it on my x86 machine (with proper AVX-512), and the "optimized" strcspn is
>> slower than the simple byte loop on bench-strcasestr.
>
> "optimized" being the sse4 version?
No idea, I just ran the benchmark as a smoke test. However this code looks wrong:
+ s = (char *)strcspn(s, a);
Cheers,
Wilco
next prev parent reply other threads:[~2023-10-17 9:58 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-07 22:14 Wilco Dijkstra
2023-10-14 8:32 ` James Tirta Halim
2023-10-16 12:59 ` Adhemerval Zanella Netto
2023-10-16 13:52 ` Wilco Dijkstra
2023-10-16 16:56 ` Noah Goldstein
2023-10-17 9:57 ` Wilco Dijkstra [this message]
2023-10-14 8:56 ` [PATCH 1/2] " James Tirta Halim
2023-11-28 14:01 ` [PATCH] strcasestr: try to find non-alpha char in NEEDLE James Tirta Halim
2023-12-04 14:44 ` Carlos O'Donell
-- strict thread matches above, loose matches on Subject: below --
2023-09-06 17:42 [PATCH] strcasestr: check if ne[0] is in hs with strchr or strpbrk as does strstr James Tirta Halim
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=PAWPR08MB898201AB6B2F497940B7267183D6A@PAWPR08MB8982.eurprd08.prod.outlook.com \
--to=wilco.dijkstra@arm.com \
--cc=adhemerval.zanella@linaro.org \
--cc=goldstein.w.n@gmail.com \
--cc=libc-alpha@sourceware.org \
--cc=tirtajames45@gmail.com \
/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).