From owner-freebsd-questions@FreeBSD.ORG Wed Feb 18 22:25:15 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 E043A1065670 for ; Wed, 18 Feb 2009 22:25:15 +0000 (UTC) (envelope-from kailash.kailash@zscaler.com) Received: from rv-out-0506.google.com (rv-out-0506.google.com [209.85.198.233]) by mx1.freebsd.org (Postfix) with ESMTP id BA7468FC19 for ; Wed, 18 Feb 2009 22:25:15 +0000 (UTC) (envelope-from kailash.kailash@zscaler.com) Received: by rv-out-0506.google.com with SMTP id f6so140453rvb.43 for ; Wed, 18 Feb 2009 14:25:15 -0800 (PST) Received: by 10.142.108.2 with SMTP id g2mr1856786wfc.190.1234995915126; Wed, 18 Feb 2009 14:25:15 -0800 (PST) Received: from KAILASH2007 (75-101-82-128.static.dsltransport.net [75.101.82.128]) by mx.google.com with ESMTPS id 22sm574542wfi.21.2009.02.18.14.25.14 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 18 Feb 2009 14:25:14 -0800 (PST) From: "Kailash Kailash" To: "'Wojciech Puchar'" References: <499c7357.14098e0a.1394.ffffda2d@mx.google.com> <20090218224551.X39029@wojtek.tensor.gdynia.pl> In-Reply-To: <20090218224551.X39029@wojtek.tensor.gdynia.pl> Date: Wed, 18 Feb 2009 14:24:59 -0800 Message-ID: <499c8aca.16098e0a.172b.00f5@mx.google.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 12.0 Thread-Index: AcmSElktx01r8V0mTWyEuB5/H7w8jgABU/xA Content-Language: en-us 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 22:25:16 -0000 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" > >