public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Wilco Dijkstra <Wilco.Dijkstra@arm.com>
To: Yikun Jiang <yikunkero@gmail.com>,
	Xuelei Zhang <zhangxuelei4@huawei.com>
Cc: "libc-alpha@sourceware.org" <libc-alpha@sourceware.org>,
	nd <nd@arm.com>, Siddhesh Poyarekar <siddhesh@gotplt.org>,
	"jiangyikun@huawei.com" <jiangyikun@huawei.com>,
	Szabolcs Nagy <Szabolcs.Nagy@arm.com>
Subject: Re: [PATCH v2 2/2] aarch64: Optimized memcpy and memmove for Kunpeng processor
Date: Fri, 18 Oct 2019 15:50:00 -0000	[thread overview]
Message-ID: <VI1PR0801MB2127DF696CA54169D5D452AF836C0@VI1PR0801MB2127.eurprd08.prod.outlook.com> (raw)
In-Reply-To: <CAArz_dBiA_boCQmyuQLkK+8--U-Mxn9G9HHpjupEFn28k8SnSg@mail.gmail.com>

Hi Yikun,

>> Btw do you have any plans to post other string functions that you can discuss here? If so, would these
>> add more ifuncs or improve the generic versions?
>
> Yes, memcmp, strlen, strnlen, strcpy, memrchr will be included, we will summited the patch and test results as soon as possible.
>
>We have submitted the patches of string functions, see below:

Thanks, that makes it easier to discuss in more detail. So in almost all cases these
patches add new ifuncs. There are general issues with ifuncs which make adding
lots of similar ifuncs a bad idea. The key problem is that ifuncs are not used inside
GLIBC itself. For example the strstr implementation benefits from a fast memcmp
but it always uses the generic memcmp, so it won't get any gains from the Kunpeng
optimized one.

So this makes it highly desirable to improve the generic versions of string functions.
From what I see, all of the changes are fairly simple and generic improvements, so
can be done easily to the generic versions. I think it would be a very bad idea to add
lots of ifunc variants which are almost identical to existing versions and differ in
minor details like unrolling.

For example strlen and memcmp add unrolling to existing code. Note that memchr_strlen
significantly outperforms the fastest strlen on sizes larger than 256, so I don't think that
using uminv to test for zeroes is the fastest approach.

Cheers,
Wilco

  reply	other threads:[~2019-10-18 15:50 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-17 13:16 Xuelei Zhang
2019-10-17 14:57 ` Yikun Jiang
2019-10-18 15:50   ` Wilco Dijkstra [this message]
2019-10-22 18:29 ` Wilco Dijkstra
2019-10-21 14:25 Zhangxuelei (Derek)
2019-10-22  9:50 ` Yikun Jiang
2019-10-24 14:57   ` Carlos O'Donell
2019-10-26  9:57     ` Florian Weimer
2019-10-26 13:40       ` Carlos O'Donell
2019-10-29  1:20     ` Carlos O'Donell
2019-10-29 14:34 ` Wilco Dijkstra
2019-10-26 13:22 Zhangxuelei (Derek)
2019-10-26 13:40 ` Carlos O'Donell
2019-10-26 13:46 Zhangxuelei (Derek)
2019-10-29  3:22 Zhangxuelei (Derek)
2019-10-29  3:26 ` Carlos O'Donell
2019-10-30  6:42   ` Yikun Jiang
2019-11-01 12:55     ` Carlos O'Donell

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=VI1PR0801MB2127DF696CA54169D5D452AF836C0@VI1PR0801MB2127.eurprd08.prod.outlook.com \
    --to=wilco.dijkstra@arm.com \
    --cc=Szabolcs.Nagy@arm.com \
    --cc=jiangyikun@huawei.com \
    --cc=libc-alpha@sourceware.org \
    --cc=nd@arm.com \
    --cc=siddhesh@gotplt.org \
    --cc=yikunkero@gmail.com \
    --cc=zhangxuelei4@huawei.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).