This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH]: Optimization for strpbrk on PowerPC
- From: OndÅej BÃlka <neleai at seznam dot cz>
- To: R Vidya <vidya at linux dot vnet dot ibm dot com>
- Cc: Adhemerval Zanella <azanella at linux dot vnet dot ibm dot com>, "GNU C. Library" <libc-alpha at sourceware dot org>
- Date: Sat, 1 Mar 2014 19:38:23 +0100
- Subject: Re: [PATCH]: Optimization for strpbrk on PowerPC
- Authentication-results: sourceware.org; auth=none
- References: <530F7D06 dot 4090309 at linux dot vnet dot ibm dot com> <20140227202420 dot GA20898 at domone dot podge> <530FA5D2 dot 7090208 at linux dot vnet dot ibm dot com> <530FA99B dot 3070500 at linux dot vnet dot ibm dot com> <5310A62D dot 40401 at linux dot vnet dot ibm dot com>
On Fri, Feb 28, 2014 at 08:37:25PM +0530, R Vidya wrote:
> Hi
> Agree, I am also seeing performance improvement with x86_64 approach
> The advantage I am seeing with this approach is that it avoids
> scanning duplicate
> chars in the needle via hash table/dictionary in addition to loop
> unrolling.
>
Also I remembered for feature request to unite this code with strspn and
strcspn one. Only differences are that you report number of bytes instead of pointer,
do not handle terminating nul specially and switch roles of 0 and 1 in strspn table.