From owner-freebsd-arch@FreeBSD.ORG Tue May 8 22:25:41 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 126B616A404; Tue, 8 May 2007 22:25:41 +0000 (UTC) (envelope-from ache@nagual.pp.ru) Received: from nagual.pp.ru (nagual.pp.ru [194.87.13.69]) by mx1.freebsd.org (Postfix) with ESMTP id 8D07713C4BA; Tue, 8 May 2007 22:25:40 +0000 (UTC) (envelope-from ache@nagual.pp.ru) Received: from nagual.pp.ru (ache@localhost [127.0.0.1]) by nagual.pp.ru (8.14.1/8.14.1) with ESMTP id l48MPPMn060001; Wed, 9 May 2007 02:25:25 +0400 (MSD) (envelope-from ache@nagual.pp.ru) Received: (from ache@localhost) by nagual.pp.ru (8.14.1/8.14.1/Submit) id l48MPOWA060000; Wed, 9 May 2007 02:25:24 +0400 (MSD) (envelope-from ache) Date: Wed, 9 May 2007 02:25:22 +0400 From: Andrey Chernov To: "Sean C. Farley" Message-ID: <20070508222521.GA59534@nagual.pp.ru> 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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20070508162458.G6015@baba.farley.org> User-Agent: Mutt/1.5.15 (2007-04-06) Cc: Daniel Eischen , arch@freebsd.org 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: Tue, 08 May 2007 22:25:41 -0000 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? IMHO with this note from Bruce "Of course, optimizing strlen() is unimportant, since even the slowest method runs at nearly 1GB/S on modern machines and you rarely have more than a few MB of strings to process." and this one from Kostik "gcc 4.3 claims to not issue cld instruction anymore (ABI requires direction flag to be clear since eon)." we can use strlen() in preparation for the future. > 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. -- http://ache.pp.ru/