Date: Tue, 22 Nov 2011 13:42:09 -0800 From: Doug Barton <dougb@FreeBSD.org> To: Eitan Adler <eadler@freebsd.org>, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org, bde@freebsd.org, theraven@freebsd.org, dim@freebsd.org, Brooks Davis <brooks@freebsd.org> Subject: Re: svn commit: r227812 - head/lib/libc/string Message-ID: <4ECC1731.8010509@FreeBSD.org> In-Reply-To: <20111122202735.GA21442@zim.MIT.EDU> References: <201111220250.pAM2oPWC070856@svn.freebsd.org> <20111122153332.GA20145@zim.MIT.EDU> <CAF6rxgmPeZCZ3c0xbd-4riqvLHob8U9eWG25R8P6FG2BjTfyyA@mail.gmail.com> <20111122202735.GA21442@zim.MIT.EDU>
next in thread | previous in thread | raw e-mail | index | archive | help
On 11/22/2011 12:27 PM, David Schultz 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! Agreed. Also, these changes seem to violate the general rule of "Don't call a change an optimization unless you have benchmarks that demonstrate that it actually is." The more critical the piece of code you are modifying, the more important this rule is. >> Is this the right course of action? Or should I just revert both >> commits entirely? Sorry to say, my vote would be to back them out. OTOH, I agree with David that you should try not to let it discourage you. Doug -- "We could put the whole Internet into a book." "Too practical." Breadth of IT experience, and depth of knowledge in the DNS. Yours for the right price. :) http://SupersetSolutions.com/
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4ECC1731.8010509>