httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Yann Ylavic <>
Subject Re: strncasecmp
Date Tue, 24 Nov 2015 09:26:26 GMT
On Tue, Nov 24, 2015 at 6:10 AM, Mikhail T. <> wrote:
> Attached is the same program with one more pair of
> functions added (and an easy way to add more "candidates" to the
> main-driver). I changed the FOR-loop define to obtain repeatable results:

This test program kills str[n]casecmp()'s inlining with the
indirections (function pointers), so it's not really fair wrt
string.h's versions.
That's not really (often) what we'll find in real world apps.

> The new pair (method 2) does not use the static table, which is likely to
> benefit from CPU-cache unfairly in repetitive benchmarks.  It is slower than
> the table-using method 1 functions. But the two pairs might be comparable --
> or even faster -- in real life.

Possibly, this version may also be more "respective" of the cacheline
(the 256 bytes table may evict hot things), yet it is slower here...


View raw message