This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] powerpc64: strcpy optimization for unaligned string


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!



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]