From owner-freebsd-questions Fri May 19 6: 5:57 2000 Delivered-To: freebsd-questions@freebsd.org Received: from theory1.physics.iisc.ernet.in (theory1.physics.iisc.ernet.in [144.16.71.20]) by hub.freebsd.org (Postfix) with SMTP id 140B237BC42 for ; Fri, 19 May 2000 06:03:36 -0700 (PDT) (envelope-from rsidd@physics.iisc.ernet.in) Received: (qmail 4286 invoked from network); 19 May 2000 11:39:05 -0000 Received: from sys3.physics.iisc.ernet.in (144.16.71.27) by theory1.physics.iisc.ernet.in with SMTP; 19 May 2000 11:39:05 -0000 Received: (qmail 5577 invoked by uid 211); 19 May 2000 11:39:04 -0000 Date: Fri, 19 May 2000 17:09:04 +0530 From: Rahul Siddharthan To: Hans Weber Cc: questions@FreeBSD.ORG Subject: Re: gcc_debian_linux_code_on_freebsd Message-ID: <20000519170902.A5422@physics.iisc.ernet.in> References: <392510FE.633E06F4@mt.luth.se> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2i In-Reply-To: <392510FE.633E06F4@mt.luth.se>; from weber@mt.luth.se on Fri, May 19, 2000 at 12:01:35PM +0200 X-Operating-System: Linux 2.0.31 i486 X-Question: Do you enjoy reading pointless headers? Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > I have a rather odd problem with gcc. (version 2.95.1) > > Code compiled on a Debian linux machine with gcc (2.95) is 20 % > faster on my freebsd machine compared to if I compile on my > freebsd machine and then run it on my freebsd machine. I have > linux compat enabled. Does this happen only on one of your programs, or on all of them? It could just be a result of using different C libraries -- maybe GNU libc/libm have faster implementations for some functions (and maybe FreeBSD's libc/libm have faster implementations for some other functions). Or maybe GNU libc works a little better on SMP machines? Unfortunately I never got around to installing gcc 2.95.x on a linux machine. But roughly, I see comparable performance with linux/egcs 1.1.2 and freebsd/gcc 2.7.2.3 or 2.95.2 with the -O flag, and up to 20% superior performance with freebsd/gcc 2.95.2 if I use the -O2 flag on both systems. These are on single processor machines, and this is with some of my code and shouldn't be taken seriously as a benchmark. Rahul. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message