From owner-freebsd-arch@FreeBSD.ORG Sat May 5 21:48:56 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 855DB16A40B; Sat, 5 May 2007 21:48:56 +0000 (UTC) (envelope-from sean-freebsd@farley.org) Received: from mail.farley.org (farley.org [67.64.95.201]) by mx1.freebsd.org (Postfix) with ESMTP id 4654C13C4AE; Sat, 5 May 2007 21:48:55 +0000 (UTC) (envelope-from sean-freebsd@farley.org) Received: from thor.farley.org (thor.farley.org [192.168.1.5]) by mail.farley.org (8.14.1/8.14.1) with ESMTP id l45LoQHY040058; Sat, 5 May 2007 16:50:26 -0500 (CDT) (envelope-from sean-freebsd@farley.org) Date: Sat, 5 May 2007 16:48:44 -0500 (CDT) From: "Sean C. Farley" To: Andrey Chernov In-Reply-To: <20070505213202.GA49925@nagual.pp.ru> Message-ID: <20070505163707.J6670@thor.farley.org> References: <20070501135439.B36275@thor.farley.org> <20070502.102822.-957833022.imp@bsdimp.com> <20070502183100.P1317@baba.farley.org> <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> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed 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: Sat, 05 May 2007 21:48:56 -0000 On Sun, 6 May 2007, Andrey Chernov wrote: > On Sat, May 05, 2007 at 03:56:21PM -0500, Sean C. Farley wrote: >> Interestingly, gcc 3.4.6 on -STABLE does not do such a great job even >> with -minline-all-stringops. I do have CPUTYPE?=pentium4 in >> /etc/make.conf. Maybe this is only an issue with i386 similar to what >> you mention below? > > Even "cc -O" do that, without any flags, see live example below: I have the same assembly output. Inlined __strleneq() ends up being faster on my system than GCC's strlen() when I changed all calls where checkEquals equaled false. I believe you that it should be faster with GCC's version, but it is not ending up that way on my Athlon XP and Pentium 4 systems running FreeBSD 6.2. There is now a sysenv-strlen.c that I tested the timings.c program in regressions/environment directory. It keeps showing __strleneq() to be faster. Sean -- sean-freebsd@farley.org