This is the mail archive of the
mailing list for the glibc project.
Re: [PATCH] powerpc64: strcpy optimization for unaligned string
- From: Adhemerval Zanella <azanella at linux dot vnet dot ibm dot com>
- To: libc-alpha at sourceware dot org
- Cc: Rajalakshmi Srinivasaraghavan <raji at linux dot vnet dot ibm dot com>
- Date: Wed, 31 Dec 2014 17:30:46 -0200
- Subject: Re: [PATCH] powerpc64: strcpy optimization for unaligned string
- Authentication-results: sourceware.org; auth=none
- References: <1418832071-93495-1-git-send-email-raji at linux dot vnet dot ibm dot com> <5491A9A5 dot 2000400 at linux dot vnet dot ibm dot com>
On 17-12-2014 14:04, Rajalakshmi Srinivasaraghavan wrote:
> This patch optimizes strcpy for ppc64 for unaligned source or
> destination address. The source or destination address is aligned
> to doubleword and data is shifted based on the alignment and
> added with the previous loaded data to be written as a doubleword.
> For each load, cmpb instruction is used for faster null check.
> More combination of unaligned inputs is also added in benchtest
> to measure the improvement.The new optimization shows 2 to 80% of
> performance improvement for longer string though it does not show
> big difference on string size less than 16 due to additional checks.
> This patch is tested on powerpc64 BE and LE and I have also attached
> the benchtest result.
> * sysdeps/powerpc/powerpc64/power7/strcpy.S: Optimize unaligned path.
> * benchtests/bench-strcpy.c: Add more unaligned inputs.
This patch looks ok and I will commit it shortly. I will also a small note
in commit message saying the patch also removes the word-aligned code path
and remove the comment associate with on the strcpy.S. Thanks!