This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] powerpc: strcasestr optimization
- From: OndÅej BÃlka <neleai at seznam dot cz>
- To: Rajalakshmi Srinivasaraghavan <raji at linux dot vnet dot ibm dot com>
- Cc: GNU C Library <libc-alpha at sourceware dot org>, Steve Munroe <sjmunroe at us dot ibm dot com>
- Date: Mon, 1 Jun 2015 14:28:30 +0200
- Subject: Re: [PATCH] powerpc: strcasestr optimization
- Authentication-results: sourceware.org; auth=none
- References: <55687597 dot 1060101 at linux dot vnet dot ibm dot com> <556C36D8 dot 2070208 at linux dot vnet dot ibm dot com>
On Mon, Jun 01, 2015 at 04:11:28PM +0530, Rajalakshmi Srinivasaraghavan wrote:
>
> This patch optimizes strcasestr function for power >= 7 systems.
> This patch uses optimized strlen and strnlen for calculating
> string length and the average improvement of this optimization is ~40%.
> This patch is tested on powerpc64 and powerpc64le.
> Attached the benchresults with this new patch.
>
Thats not enough. As strcasestr that I submited is around three times
slower your implementation would likely be regression over generic one.
A problem here is that you use moronic algorithm. Fix algorithm first
before trying to optimize it.