svn commit: r346588 - head/lib/libc/powerpc64/string

Justin Hibbits jhibbits at FreeBSD.org
Fri Apr 26 16:21:47 UTC 2019


On Tue, 23 Apr 2019 10:24:42 +0000
Alexey Dokuchaev <danfe at freebsd.org> wrote:

> On Tue, Apr 23, 2019 at 02:53:53AM +0000, Justin Hibbits wrote:
> > New Revision: 346588
> > URL: https://svnweb.freebsd.org/changeset/base/346588
> > 
> > Log:
> >   powerpc64: Rewrite strcmp in asm to take advantage of word size
> > ...
> >   Some performance gain rates between the current and the optimized
> >   solution:
> > 
> >   String size (bytes)		Gain rate
> >   	<=8			0.59%
> >   	<=16			1.92%
> >   	32			3.02%
> >   	64			5.60%
> >   	128			10.16%
> >   	256			18.05%
> >   	512			30.18%
> >   	1024			42.82%  
> 
> Nice!  This should help to speed up buildworld quite a bit.  Would it
> be feasible to patch ppc32 in a similar fashion?  Thanks,
> 
> ./danfe

This actually uses 'cmpb' which is only available on PowerISA 2.05+, so
I'll need to pull it out for now, and re-enable it once we have
ifuncs.  As it stands, this commit broke the G5 and POWER4/POWER5.

- Justin


More information about the svn-src-all mailing list