From owner-freebsd-arch@FreeBSD.ORG Wed May 9 10:08:49 2007 Return-Path: X-Original-To: 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 3A56116A403; Wed, 9 May 2007 10:08:49 +0000 (UTC) (envelope-from bde@zeta.org.au) Received: from mailout2.pacific.net.au (mailout2-3.pacific.net.au [61.8.2.226]) by mx1.freebsd.org (Postfix) with ESMTP id F1D7113C448; Wed, 9 May 2007 10:08:48 +0000 (UTC) (envelope-from bde@zeta.org.au) Received: from mailproxy1.pacific.net.au (mailproxy1.pacific.net.au [61.8.2.162]) by mailout2.pacific.net.au (Postfix) with ESMTP id CFE4D10D38D; Wed, 9 May 2007 20:08:33 +1000 (EST) Received: from besplex.bde.org (katana.zip.com.au [61.8.7.246]) by mailproxy1.pacific.net.au (Postfix) with ESMTP id D529B8C20; Wed, 9 May 2007 20:08:39 +1000 (EST) Date: Wed, 9 May 2007 20:08:39 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Andrey Chernov In-Reply-To: <20070508222521.GA59534@nagual.pp.ru> Message-ID: <20070509200000.B56490@besplex.bde.org> References: <20070502230413.Y30614@thor.farley.org> <20070503160351.GA15008@nagual.pp.ru> <20070504085905.J39482@thor.farley.org> <20070504213312.GA33163@nagual.pp.ru> <20070504174657.D1343@thor.farley.org> <20070505213202.GA49925@nagual.pp.ru> <20070505163707.J6670@thor.farley.org> <20070505221125.GA50439@nagual.pp.ru> <20070506091835.A43775@besplex.bde.org> <20070508162458.G6015@baba.farley.org> <20070508222521.GA59534@nagual.pp.ru> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: Daniel Eischen , arch@FreeBSD.org, "Sean C. Farley" Subject: Re: HEADS DOWN 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: Wed, 09 May 2007 10:08:49 -0000 On Wed, 9 May 2007, Andrey Chernov wrote: > On Tue, May 08, 2007 at 04:37:03PM -0500, Sean C. Farley wrote: >> Would it be preferred to go ahead to use strlen() in preparation for a >> faster strlen() in the future? > ... > we can use strlen() in preparation for the future. Yes, it is better to use library functions if they do (almost) exactly what is wanted. >> I would still use the inline'd version >> when counting characters while watching for an '=' character. Or should >> it also be changed to perform a strlen() and then a strchr()? > > Combined strlen()+strchr() will be slower in any case than single loop, so > better leave it as is. The compiler could in theory reduce to a single loop, but I've never seen one that does and would use the loop myself. Bruce