Date: Tue, 22 Nov 2011 20:05:00 -0500 From: Eitan Adler <eadler@freebsd.org> To: Peter Wemm <peter@wemm.org> Cc: src-committers@freebsd.org, theraven@freebsd.org, svn-src-all@freebsd.org, dim@freebsd.org, Brooks Davis <brooks@freebsd.org>, bde@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r227812 - head/lib/libc/string Message-ID: <CAF6rxgmfBXD4SPc5StEBtBaP%2BsnJo1TVqGYEWhfXwUKx4A57Jw@mail.gmail.com> In-Reply-To: <CAGE5yCpnNvv-Y6%2BJ4%2BTn75-aK2v6O_QW6Qy1i3Mkc6qqSbMTpg@mail.gmail.com> References: <201111220250.pAM2oPWC070856@svn.freebsd.org> <20111122153332.GA20145@zim.MIT.EDU> <CAF6rxgmPeZCZ3c0xbd-4riqvLHob8U9eWG25R8P6FG2BjTfyyA@mail.gmail.com> <20111122202735.GA21442@zim.MIT.EDU> <CAGE5yCpnNvv-Y6%2BJ4%2BTn75-aK2v6O_QW6Qy1i3Mkc6qqSbMTpg@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAF6rxgmfBXD4SPc5StEBtBaP%2BsnJo1TVqGYEWhfXwUKx4A57Jw>