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] faster strlen implementation


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. 


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