From owner-svn-src-all@FreeBSD.ORG Tue Nov 22 21:42:25 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx2.freebsd.org (mx2.freebsd.org [IPv6:2001:4f8:fff6::35]) by hub.freebsd.org (Postfix) with ESMTP id 0AD291065673; Tue, 22 Nov 2011 21:42:25 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from [127.0.0.1] (hub.freebsd.org [IPv6:2001:4f8:fff6::36]) by mx2.freebsd.org (Postfix) with ESMTP id B676C14D822; Tue, 22 Nov 2011 21:42:09 +0000 (UTC) Message-ID: <4ECC1731.8010509@FreeBSD.org> Date: Tue, 22 Nov 2011 13:42:09 -0800 From: Doug Barton Organization: http://www.FreeBSD.org/ User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:8.0) Gecko/20111105 Thunderbird/8.0 MIME-Version: 1.0 To: Eitan Adler , 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 References: <201111220250.pAM2oPWC070856@svn.freebsd.org> <20111122153332.GA20145@zim.MIT.EDU> <20111122202735.GA21442@zim.MIT.EDU> In-Reply-To: <20111122202735.GA21442@zim.MIT.EDU> X-Enigmail-Version: 1.3.3 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Subject: Re: svn commit: r227812 - head/lib/libc/string X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Nov 2011 21:42:25 -0000 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/