From owner-freebsd-arch@FreeBSD.ORG Wed Jul 11 23:51:23 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 953AD16A400; Wed, 11 Jul 2007 23:51:23 +0000 (UTC) (envelope-from dillon@apollo.backplane.com) Received: from apollo.backplane.com (apollo.backplane.com [216.240.41.2]) by mx1.freebsd.org (Postfix) with ESMTP id 17E7813C45A; Wed, 11 Jul 2007 23:51:23 +0000 (UTC) (envelope-from dillon@apollo.backplane.com) Received: from apollo.backplane.com (localhost [127.0.0.1]) by apollo.backplane.com (8.13.8/8.13.7) with ESMTP id l6BNpMes063848; Wed, 11 Jul 2007 16:51:22 -0700 (PDT) Received: (from dillon@localhost) by apollo.backplane.com (8.13.8/8.13.4/Submit) id l6BNpMUN063847; Wed, 11 Jul 2007 16:51:22 -0700 (PDT) Date: Wed, 11 Jul 2007 16:51:22 -0700 (PDT) From: Matthew Dillon Message-Id: <200707112351.l6BNpMUN063847@apollo.backplane.com> 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> 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:51:23 -0000 :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 Yes, but there's a difference between using strlen() a couple of times in the program and using it in a core processing loop or other high-performance element of the program. And even if it is used in such places it isn't going to be used so often that the program would actually benefit from the few nanoseconds of improvement you might get from it. The chances of that are nearly zero. -Matt