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] [Patch 1/1] [Powerpc] Tune/optimize powerpc{32,64}/power7/memchr.S.


On Fri, 2012-05-11 at 08:52 -0500, Will Schmidt wrote:
> [Powerpc] Tune/optimize powerpc{32,64}/power7/memchr.S.
> 
> Assorted tweaking, twisting and tuning to squeeze a few additional cycles
> out of the memchr code.   Changes include bypassing the shift pairs (sld,srd)
> when they are not required, and unrolling the small_loop that handles short
> and trailing strings.
> Per scrollpipe data measuring aligned strings for 64-bit, these changes save
> between five and eight cycles (9-13% overall) for short strings (<32),  Longer
> aligned strings see slight improvement of 1-3% due to bypassing the shifts
> and the instruction rearranging.  Attempts to rework and partially unroll
> the main loop did not show any benefits.
> The Powerpc32 version of the code was changed in a similar fashion to match,
> and should show similar improvements.
> 
> Passed make check with no regressions.
> 
> While I was in the neighborhood, I updated a few of the existing comments so
> they made a bit more sense to me, and touched up a bit of the whitespace for
> better consistency throughout.
> 
> 2012-05-10  Will Schmidt <will_schmidt@vnet.ibm.com>
> 
> 	* sysdeps/powerpc/powerpc64/power7/memchr.S:  Unrolled short loop and
> 	 slight instruction rearrangements per scrollpipe analysis.
> 	* sysdeps/powerpc/powerpc64/power7/memchr.S:  Ditto.

I retested this against the current master branch (it passed), amended
the ChangeLog to follow proper guidelines and checked it in under git
commit 14a50c9d238a8d79d48193482ed9a2be52d1dc3d

2012-08-21  Will Schmidt  <will_schmidt@vnet.ibm.com>

        * sysdeps/powerpc/powerpc64/power7/memchr.S: Unrolled short loop and
        slight instruction rearrangements per scrollpipe analysis.
        * sysdeps/powerpc/powerpc64/power7/memchr.S: Likewise.

Ryan S. Arnold
IBM Linux Technology Center


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