From owner-freebsd-questions Fri May 19 3: 1:57 2000 Delivered-To: freebsd-questions@freebsd.org Received: from eol.mt.luth.se (eol.mt.luth.se [130.240.1.16]) by hub.freebsd.org (Postfix) with ESMTP id B7C7037BE83 for ; Fri, 19 May 2000 03:01:53 -0700 (PDT) (envelope-from weber@mt.luth.se) Received: from mt.luth.se (fysik3.mt.luth.se [130.240.1.113]) by eol.mt.luth.se (8.10.1/8.10.1) with ESMTP id e4JA1pS24213; Fri, 19 May 2000 12:01:51 +0200 (MET DST) Message-ID: <392510FE.633E06F4@mt.luth.se> Date: Fri, 19 May 2000 12:01:35 +0200 From: Hans Weber X-Mailer: Mozilla 4.72 [en] (X11; I; FreeBSD 4.0-RELEASE i386) X-Accept-Language: en MIME-Version: 1.0 To: questions@FreeBSD.org Subject: gcc_debian_linux_code_on_freebsd Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Dear Sirs 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. I would like to get at least equally fast code from gcc freebsd as I get from gcc on debian. The program is a molecular dynamics program doing lots of floats. The times are typically: compiled and run on freebsd 36 seconds compiled on debian and run on freebsd 30 seconds I have tried some tricks with setenv and a variable with lots of characters this can result in (I got this from tip from a friend) compiled and run on freebsd becoming 34.5 seconds Compile is done with on both debian and freebsd. gcc -O -o langevin langevin.c -lm and these are the includes in my program. # include # include # include # include I have just added smp and taken out i386 and i486 from build fysik3 102> cat motd FreeBSD 4.0-RELEASE (SMPKERNEL) #1: Tue May 9 13:24:58 CEST 2000 Welcome to FreeBSD! Best regards HAns Weber To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message