[PATCH, AArch64] Add optimized strchr.

Ondřej Bílka neleai@seznam.cz
Wed Jun 25 01:42:00 GMT 2014


On Wed, Jun 11, 2014 at 11:54:59AM +0100, Richard Earnshaw wrote:
> Implementation of strchr for AArch64.  Speedups taken from micro-bench
> show the improvements relative to the standard C code.
>
As comments that I made about strchrnul apply also here I will reply
here as strchr is more used.

Our ultimate criteria is if change would improve programs or not, a
benchmarks would give approximation of that.

I have a relatively simple test for that. It just measures a running
time of simple bash script. Could you try several variants with it?

A reason for bash is that most strchr calls on my computer are from
bash. Good implementation makes a difference there, by tweaking old
strchr it on x64 improved performance by around 0.2%.

A benchmark is here, you need to add .so's with different
implementations and then run ./benchmark and wait 10 minutes or so.

http://kam.mff.cuni.cz/~ondra/strchr_consistency_benchmark.tar.bz2 



More information about the Libc-alpha mailing list