This is the mail archive of the mailing list for the glibc project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH v2 2/2] aarch64: Optimized memcpy and memmove for Kunpeng processor

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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]