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

[ Available lists | Index of svn-src-head | Month of Nov 2011 | Week of 23 Nov 2011 | Raw email | View thread | Wrap long lines | Reply | Tag ]
From
Eitan Adler <eadler@freebsd.org>
Date
23 Nov 2011 01:05:33
Subject
Re: svn commit: r227812 - head/lib/libc/string
Message-ID
CAF6rxgmfBXD4SPc5StEBtBaP+snJo1TVqGYEWhfXwUKx4A57Jw@mail.gmail.com


[ Hide this part ]
On Tue, Nov 22, 2011 at 6:56 PM, Peter Wemm <peter@wemm.org> wrote:
> On Tue, Nov 22, 2011 at 12:27 PM, David Schultz <das@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

Elapsed time: 0.316 seconds