From owner-cvs-src@FreeBSD.ORG Thu Apr 7 18:42:55 2005 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 16E7B16A4CF; Thu, 7 Apr 2005 18:42:55 +0000 (GMT) Received: from cs.rice.edu (cs.rice.edu [128.42.1.30]) by mx1.FreeBSD.org (Postfix) with ESMTP id 97BB743D5F; Thu, 7 Apr 2005 18:42:54 +0000 (GMT) (envelope-from alc@cs.rice.edu) Received: from localhost (calypso.cs.rice.edu [128.42.1.127]) by cs.rice.edu (Postfix) with ESMTP id EA2F14A9A2; Thu, 7 Apr 2005 13:42:52 -0500 (CDT) Received: from cs.rice.edu ([128.42.1.30]) by localhost (calypso.cs.rice.edu [128.42.1.127]) (amavisd-new, port 10024) with LMTP id 04991-01-73; Thu, 7 Apr 2005 13:42:52 -0500 (CDT) Received: by cs.rice.edu (Postfix, from userid 19572) id 70FCB4A99E; Thu, 7 Apr 2005 13:42:52 -0500 (CDT) Date: Thu, 7 Apr 2005 13:42:52 -0500 From: Alan Cox To: Alexey Dokuchaev , Alan Cox , src-committers@FreeBSD.ORG, cvs-src@FreeBSD.ORG, cvs-all@FreeBSD.ORG Message-ID: <20050407184252.GE20275@cs.rice.edu> References: <200504070356.j373u3MP005490@repoman.freebsd.org> <20050407093046.GC1049@FreeBSD.org> <20050407132932.GA27083@VARK.MIT.EDU> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050407132932.GA27083@VARK.MIT.EDU> User-Agent: Mutt/1.4.2i X-Virus-Scanned: by amavis-2.2.1 at cs.rice.edu Subject: Re: cvs commit: src/lib/libc/amd64/string Makefile.inc bcopy.S bzero.S memcpy.S memmove.S memset.S X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Apr 2005 18:42:55 -0000 On Thu, Apr 07, 2005 at 09:29:33AM -0400, David Schultz wrote: > On Thu, Apr 07, 2005, Alexey Dokuchaev wrote: > > On Thu, Apr 07, 2005 at 03:56:03AM +0000, Alan Cox wrote: > > > alc 2005-04-07 03:56:03 UTC > > > > > > FreeBSD src repository > > > > > > Added files: > > > lib/libc/amd64/string Makefile.inc bcopy.S bzero.S memcpy.S > > > memmove.S memset.S > > > Log: > > > Add machine-specific, optimized implementations of bcopy, bzero, memcpy, > > > memmove, and memset. > > > > Great! Are we going to see something like this for ia32? > > i386 has had them since the beginnning of time, and the code > Alan committed is a port of the i386 versions. Yes, exactly. That said, the benefits are profound on microbenchmarks and measureable on macrobenchmarks, like buildworld. As for more "exotic" copy routines, these are user space routines. So, it is already the case that SSE registers can be used if desired. However, the AMD optimization manual only recommends their use for very large copies. Among the reasons is the fact that even the simple methods are moving/zeroing data 64 bits at a time. So, switching to 128-bit SSE registers has a less dramatic effect than on i386, where Matt is benchmarking. Alan