This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]


Dear Sirs

I have a rather odd problem with gcc. (version 2.95.1)

My question is How can I get faster code from freebsd gcc compiler?

Code compiled on a Debian linux machine (installed feb 2000) with
gcc (2.95) is 20 % faster on my freebsd machine compared to if
I compile on my freebsd machines gcc (2.95.1)  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 code run on freebsd.

     The program is a molecular dynamics program doing lots of floats.

      The times are typically (test runs):
       compiled and run on freebsd   36 seconds
       compiled on debian and run on freebsd 30 seconds

Compile is done with on both debian and freebsd.
gcc -O -o langevin langevin.c -lm

I have checked out the gcc compiler options on
and tried several combinations of them on my gcc freebsd
but I never get below 34.5 seconds.
Not near the debian-gcc code performance on freebsd.

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

        compiled and run on freebsd becoming 34.5 seconds

and these are the includes in my program.
# include <stdio.h>
# include <math.h>
# include <stdlib.h>
# include <limits.h>

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
I downloaded the FreeBSD in the beginning of May.

Best regards
Hans Weber
Department of  Physics
Luleň University of Technology

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]