This is the mail archive of the libc-alpha@sourceware.org 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 10/27] S390: Optimize stpcpy and wcpcpy.


On 07/03/2015 10:11 PM, OndÅej BÃlka wrote:
Here you could improve performance by using different ends so you could
increase src and dest by 64 at end. That will allow simpler addressing
which may help with ooo execution. If space is concern then following
pattern looks promising:

while (1)
{
if (has_zero(src))
   goto add0;
if (has_zero(src+16))
   goto add16;
if (has_zero(src+32))
   goto add32;
if (has_zero(src+48))
   goto add48;
   x+=64;
   n+=64;
}

add48:
src+=16;
dest+=16;

add32:
src+=16;
dest+=16;

add16:
src+=16;
dest+=16;

add0:


Ok. Thanks. I've changed it for stp/wcpcpy with this patch
and for str/wcscpy, strcat/wcscat and the variants with given maxlen with separate ones.

The changelog remains the same.
Bye Stefan

Attachment: 20150706_stpcpy
Description: Text document


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