From owner-freebsd-arch@FreeBSD.ORG Wed Jul 11 23:43:19 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 DF9B016A400 for ; Wed, 11 Jul 2007 23:43:19 +0000 (UTC) (envelope-from scf@FreeBSD.org) Received: from mail.farley.org (farley.org [67.64.95.201]) by mx1.freebsd.org (Postfix) with ESMTP id A499B13C459 for ; Wed, 11 Jul 2007 23:43:19 +0000 (UTC) (envelope-from scf@FreeBSD.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 l6BNj8CB010685; Wed, 11 Jul 2007 18:45:08 -0500 (CDT) (envelope-from scf@FreeBSD.org) Date: Wed, 11 Jul 2007 18:43:00 -0500 (CDT) From: "Sean C. Farley" To: Matthew Dillon In-Reply-To: <200707112221.l6BML722062857@apollo.backplane.com> Message-ID: <20070711183217.C2385@thor.farley.org> References: <20070711134721.D2385@thor.farley.org> <20070711221338.GC20178@turion.vk2pj.dyndns.org> <200707112221.l6BML722062857@apollo.backplane.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.1 X-Spam-Checker-Version: SpamAssassin 3.2.1 (2007-05-02) on mail.farley.org 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: Wed, 11 Jul 2007 23:43:20 -0000 On Wed, 11 Jul 2007, Matthew Dillon wrote: > Long ago I decided that strlen() was simply not in the critical > path for virtually any program. A few nanoseconds here or there is > not going to result in any noticeable improvement for any program > other then a benchmark designed to test strlen(). It isn't worth > the effort to optimize. Since strlen() is used in every program directly or indirectly through libc, I thought it was beneficial to make it faster. In the case of i386, the C version used by all the other architectures, except for ARM, is much faster that the assembly version. This is without any optimization on its part. I need to test out grep (FreeGrep) to see how it behaves when calling regexec() (may use strlen() in certain cases) many times (i.e., grep -R on the source tree) using both versions. Sean -- scf@FreeBSD.org