[PATCH] faster strlen implementation
Ondřej Bílka
neleai@seznam.cz
Sat Jul 14 03:29:00 GMT 2012
On Sat, Jul 07, 2012 at 08:45:29PM +0200, OndÅej BÃlka wrote:
> Here is optimized strlen sse2 implementation. It is about twice as fast
> on i7.
>
> Benchmarks are here:
> http://kam.mff.cuni.cz/~ondra/benchmark_string/i7/strlen/html/test_r.html
> http://kam.mff.cuni.cz/~ondra/benchmark_string/xeon/strlen/html/test_r.html
> http://kam.mff.cuni.cz/~ondra/benchmark_string/phenomII/strlen/html/test_r.html
> http://kam.mff.cuni.cz/~ondra/benchmark_string/opteron/strlen/html/test_r.html
It turned that I forgot to look if strlen implementation changed since
2.13 I tested with (strstr,chr.. did not).
A glibc pminub implementation is faster when string is in L1 cache, then
my prefetch makes it faster.
More information about the Libc-alpha
mailing list