svn commit: r227812 - head/lib/libc/string

Eitan Adler eadler at freebsd.org
Wed Nov 23 01:05:33 UTC 2011


On Tue, Nov 22, 2011 at 6:56 PM, Peter Wemm <peter at wemm.org> wrote:
> On Tue, Nov 22, 2011 at 12:27 PM, David Schultz <das at freebsd.org> wrote:
>> On Tue, Nov 22, 2011, Eitan Adler wrote:
>>> The problem with profiling this type of change is that it is hard to
>>> find a good representative benchmark. I could easily write code that
>>> will show you that adding the equality check is a good idea or that it
>>> is a horrible idea. IMHO it saves enough time when they are equal, but
>>> loses almost no time when the strings are not equal.
>>
>> Benchmark or not, I think you'll have a very hard time finding a
>> single real program that routinely calls strcasecmp() with
>> identical pointers!
>
> At this point I'd like to mention ministat(1).

I know how to use ministat ;)
The problem is that I could, with some effort, write a program which
will show that this change is significant, and a second program which
shows you this change is not. The issue here is find a good
representative benchmark upon which to use ministat.  I was unable to
find any "standard" string manipulation benchmark to test.  When I
first thought of this change I (a) asked people on C mailing lists and
IRC channels (b) looked to see if anyone else did it (glibc does,
netbsd and avr-libc don't).  In either case I should have posted the
patch to -hackers prior to committing.

-- 
Eitan Adler
Ports committer
X11, Bugbusting teams


More information about the svn-src-head mailing list