From owner-svn-src-all@FreeBSD.ORG Wed Nov 23 01:05:33 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C9B2F106564A; Wed, 23 Nov 2011 01:05:33 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: from mail-ww0-f50.google.com (mail-ww0-f50.google.com [74.125.82.50]) by mx1.freebsd.org (Postfix) with ESMTP id 490D38FC17; Wed, 23 Nov 2011 01:05:32 +0000 (UTC) Received: by wwg14 with SMTP id 14so1372230wwg.31 for ; Tue, 22 Nov 2011 17:05:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eitanadler.com; s=0xdeadbeef; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; bh=SgZB53BcR139u2OL6VY4OIZeIcC9FneEBkTfo6FY0q4=; b=MYWk7zIFuRUqy2BM5RNrFtgVD2BWJCjVsbg9gGQEtDT3XmJ8gxdNacZJX1PIre5boQ t103s6VWrnEQFtsbLme+OytoVMjF7ZBcUmp+AcHyutKpxMwm1/5aW711n5SSVfhzOP3C w+xMYCW7OkfKaCtIu6bJL5361ZSoksEowNPbk= Received: by 10.227.205.130 with SMTP id fq2mr16558719wbb.17.1322010331105; Tue, 22 Nov 2011 17:05:31 -0800 (PST) MIME-Version: 1.0 Sender: lists@eitanadler.com Received: by 10.216.21.133 with HTTP; Tue, 22 Nov 2011 17:05:00 -0800 (PST) In-Reply-To: References: <201111220250.pAM2oPWC070856@svn.freebsd.org> <20111122153332.GA20145@zim.MIT.EDU> <20111122202735.GA21442@zim.MIT.EDU> From: Eitan Adler Date: Tue, 22 Nov 2011 20:05:00 -0500 X-Google-Sender-Auth: NFGy6EJn_4GJJDcHE8_n4_YnztE Message-ID: To: Peter Wemm Content-Type: text/plain; charset=UTF-8 Cc: src-committers@freebsd.org, theraven@freebsd.org, svn-src-all@freebsd.org, dim@freebsd.org, Brooks Davis , bde@freebsd.org, svn-src-head@freebsd.org 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: Wed, 23 Nov 2011 01:05:33 -0000 On Tue, Nov 22, 2011 at 6:56 PM, Peter Wemm wrote: > On Tue, Nov 22, 2011 at 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! > > 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