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] PowerPC:strrchr() optimization


On Mon, Feb 10, 2014 at 11:43:09AM +0530, Rajalakshmi Srinivasaraghavan wrote:
> Hi All
> 
> This patch optimizes strrchr() for ppc64. I have attached the benchtest
> output to show the performance improvement.This is coded with strchr.S as reference and uses
> cmpb instruction for speed improvement.

Hi, 

There is one thing to check as strrchr could be genericaly implemented
by other primitives.

I send a patch for that, could you check how does that compare?

https://sourceware.org/ml/libc-alpha/2013-10/msg00201.html

Benchmarking strrchr is bit tricky as performance depends on frequency
of searched character. I did profiling and most common usecase is
finding trailing / in pathnames. Typically a result is between 10 and 20
characters from start. See following for more statistic.

http://kam.mff.cuni.cz/~ondra/benchmark_string/i7_ivy_bridge/strrchr_profile/results_gcc/result.html

 


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