This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] powerpc64: Add POWER8 strnlen
- From: "Tulio Magno Quites Machado Filho" <tuliom at linux dot vnet dot ibm dot com>
- To: Wainer dos Santos Moschetta <wainersm at linux dot vnet dot ibm dot com>, libc-alpha at sourceware dot org
- Cc:
- Date: Wed, 05 Apr 2017 11:50:26 -0300
- Subject: Re: [PATCH] powerpc64: Add POWER8 strnlen
- Authentication-results: sourceware.org; auth=none
- References: <20170321201144.10513-1-wainersm@linux.vnet.ibm.com> <955A086F-92D5-420A-A063-9D5FBA6F2D18@linux.vnet.ibm.com> <d6442a3c-92be-f440-c816-0f4d93671ddc@linux.vnet.ibm.com>
Wainer dos Santos Moschetta <wainersm@linux.vnet.ibm.com> writes:
> Ping. Any objection to merge this change?
I'm sorry for the long delay.
LGTM too and pushed as 18b6e2c.
> On 03/23/2017 06:14 PM, Carlos Eduardo Seo wrote:
>>
>> On 3/21/17, 5:11 PM, "Wainer dos Santos Moschetta" <libc-alpha-owner@sourceware.org on behalf of wainersm@linux.vnet.ibm.com> wrote:
>>
>> Added strnlen POWER8 otimized for long strings. It delivers
>> same performance as POWER7 implementation for short strings.
>>
>> This takes advantage of reasonably performing unaligned loads
>> and bit permutes to check the first 1-16 bytes until
>> quadword aligned, then checks in 64 bytes strides until unsafe,
>> then 16 bytes, truncating the count if need be.
>>
>> Likewise, the POWER7 code is recycled for less than 32 bytes strings.
>>
>> Tested on ppc64 and ppc64le.
>>
>>
>>
>> LGTM
--
Tulio Magno