[PATCH] PowerPC:strrchr() optimization
Ondřej Bílka
neleai@seznam.cz
Wed Feb 12 17:34:00 GMT 2014
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
More information about the Libc-alpha
mailing list