From owner-freebsd-questions@FreeBSD.ORG Wed Feb 18 23:13:13 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0B0321065679 for ; Wed, 18 Feb 2009 23:13:13 +0000 (UTC) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Received: from wojtek.tensor.gdynia.pl (wojtek.tensor.gdynia.pl [IPv6:2001:4070:101:2::1]) by mx1.freebsd.org (Postfix) with ESMTP id 2D3DC8FC1E for ; Wed, 18 Feb 2009 23:13:11 +0000 (UTC) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Received: from wojtek.tensor.gdynia.pl (localhost [IPv6:::1]) by wojtek.tensor.gdynia.pl (8.14.3/8.14.3) with ESMTP id n1IND9O6040310; Thu, 19 Feb 2009 00:13:09 +0100 (CET) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Received: from localhost (wojtek@localhost) by wojtek.tensor.gdynia.pl (8.14.3/8.14.3/Submit) with ESMTP id n1IND8IU040307; Thu, 19 Feb 2009 00:13:09 +0100 (CET) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Date: Thu, 19 Feb 2009 00:13:08 +0100 (CET) From: Wojciech Puchar To: Kailash Kailash In-Reply-To: <499c8aca.16098e0a.172b.00f5@mx.google.com> Message-ID: <20090219001251.O40306@wojtek.tensor.gdynia.pl> References: <499c7357.14098e0a.1394.ffffda2d@mx.google.com> <20090218224551.X39029@wojtek.tensor.gdynia.pl> <499c8aca.16098e0a.172b.00f5@mx.google.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-questions@freebsd.org Subject: RE: FreeBSD 7.O compiled code is very slow X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Feb 2009 23:13:13 -0000 you install it from ports and use explicitly, everything else still uses default On Wed, 18 Feb 2009, Kailash Kailash wrote: > Can old version of GCC used with BSD 7.0 without facing any compatibility > problem? > Thanks, > Kailash > > -----Original Message----- > From: Wojciech Puchar [mailto:wojtek@wojtek.tensor.gdynia.pl] > Sent: Wednesday, February 18, 2009 1:46 PM > To: Kailash Kailash > Cc: freebsd-questions@freebsd.org > Subject: Re: FreeBSD 7.O compiled code is very slow > > looks like they "improved" gcc. you can install older from ports. > > On Wed, 18 Feb 2009, Kailash Kailash wrote: > >> I am using FreeBSD 7.0 in 64 BIT mode. Same code compiled on BSD 7.0 runs >> 50% speed (as expected by CPU and code architecture) compared to BSD 6.2. >> Here is one real code with binary output. On 3.0 GHz Woodcrest processor, > I >> am able to copy from one cache to another cache at the speed of >> 24Gbytes/second verses 12 Gbytes/second. Any help is appreciated. >> >> Thanks, >> >> Kailash >> >> >> >> Source-code: >> >> #define BACKWARD_MEMCOPY_WITH_TYPE(dp, sp, len, type) >> BACKWARD_MEMCOPY((type*)(dp), (const type*)(sp), >> ((len)+(sizeof(type)-1))/sizeof(type)) >> >> >> >> #define BACKWARD_MEMCOPY(dp, sp, len) \ >> >> do { \ >> >> smwbits __len = len; /* must be signed value */ \ >> >> while (--__len >= 0) \ >> >> (dp)[__len] = (sp)[__len]; \ >> >> } while (0) >> >> >> >> BSD 6.2 code >> >> 0x00000000004353b2 : mov >> 0x8(%rbp,%rdx,8),%rax >> >> 0x00000000004353b7 : mov >> %rax,0x48(%r12,%rdx,8) >> >> 0x00000000004353bc : dec %rdx >> >> 0x00000000004353bf : jns 0x4353b2 >> >> >> >> >> BSD 7.0 code >> >> 0x000000000040cb80 : mov >> 0xfffffffffffffff8(%rsi),%rax >> >> 0x000000000040cb84 : mov >> %rax,0xfffffffffffffff8(%rcx) >> >> 0x000000000040cb88 : sub >> $0x8,%rsi >> >> 0x000000000040cb8c : sub >> $0x8,%rcx >> >> 0x000000000040cb90 : sub >> $0x1,%rdx >> >> 0x000000000040cb94 : jns >> 0x40cb80 >> >> >> >> _______________________________________________ >> freebsd-questions@freebsd.org mailing list >> http://lists.freebsd.org/mailman/listinfo/freebsd-questions >> To unsubscribe, send any mail to > "freebsd-questions-unsubscribe@freebsd.org" >> >> > >