This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] powerpc: Optimized strncat for POWER7/PPC64
- From: OndÅej BÃlka <neleai at seznam dot cz>
- To: Adhemerval Zanella <azanella at linux dot vnet dot ibm dot com>
- Cc: "GNU C. Library" <libc-alpha at sourceware dot org>
- Date: Sat, 3 Jan 2015 11:07:13 +0100
- Subject: Re: [PATCH] powerpc: Optimized strncat for POWER7/PPC64
- Authentication-results: sourceware.org; auth=none
- References: <549AAECD dot 2050408 at linux dot vnet dot ibm dot com>
On Wed, Dec 24, 2014 at 10:17:17AM -0200, Adhemerval Zanella wrote:
> Hi
>
> The commit 3eb38795dbbbd816 (Simplify strncat) implements a new
> strncat algorithm that uses strlen, strnlen, and memcpy. This is
> faster than POWER7 current implementation, especially for unaligned
> strings (where POWER7 code uses byte-byte operations).
>
> This patch removes the assembly implementation and uses a multiarch
> especialization based on default algorithm calling optimized POWER7
> symbols. Benchtests results in attachments (ran on a POWER8 machine).
>
> Tested on powerpc64 and powerpc64le.
>
Should be ok, assembly implementation is lot slower in practice as its
rarely called at all and so is unlikely in cache.