From owner-freebsd-arch@FreeBSD.ORG Thu Jul 12 22:03:24 2007 Return-Path: X-Original-To: freebsd-arch@FreeBSD.org Delivered-To: freebsd-arch@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 96F1416A41F; Thu, 12 Jul 2007 22:03:24 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (tim.des.no [194.63.250.121]) by mx1.freebsd.org (Postfix) with ESMTP id 545E113C447; Thu, 12 Jul 2007 22:03:24 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (localhost [127.0.0.1]) by spam.des.no (Postfix) with ESMTP id 6483820B0; Fri, 13 Jul 2007 00:03:20 +0200 (CEST) X-Spam-Tests: AWL X-Spam-Learn: disabled X-Spam-Score: 0.0/3.0 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on tim.des.no Received: from dwp.des.no (des.no [80.203.243.180]) by smtp.des.no (Postfix) with ESMTP id DBB3F20AF; Fri, 13 Jul 2007 00:03:19 +0200 (CEST) Received: by dwp.des.no (Postfix, from userid 1001) id BC9D55292; Fri, 13 Jul 2007 00:03:19 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: "Sean C. Farley" References: <20070711134721.D2385@thor.farley.org> <20070711221338.GC20178@turion.vk2pj.dyndns.org> <200707112221.l6BML722062857@apollo.backplane.com> <20070711183217.C2385@thor.farley.org> <86lkdl5osc.fsf@dwp.des.no> <20070712161200.I8789@thor.farley.org> Date: Fri, 13 Jul 2007 00:03:19 +0200 In-Reply-To: <20070712161200.I8789@thor.farley.org> (Sean C. Farley's message of "Thu\, 12 Jul 2007 16\:27\:49 -0500 \(CDT\)") Message-ID: <86hco95lg8.fsf@dwp.des.no> User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/21.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: freebsd-arch@FreeBSD.org Subject: Re: Assembly string functions in i386 libc X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jul 2007 22:03:24 -0000 "Sean C. Farley" writes: > On Thu, 12 Jul 2007, Dag-Erling Sm=C3=B8rgrav wrote: > > The first rule of optimization is: don't do it. > > The second rule of optimization is: don't do it yet. > > The third rule of optimization is: don't optimize what you haven't > > measured. > I am a rule breaker at least for the first two. :) I tried to follow > the third rule. > > > Can you show us an actual application that spends a significant part > > of its run time in strlen()? > My test program that loops over strlen(). So the answer is no, and you don't understand the third rule which you claim to follow. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no