gcc_debian_linux_code_on_freebsd
Hans Weber
weber@mt.luth.se
Mon May 22 23:55:00 GMT 2000
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
http://gcc.gnu.org/benchresults/aov.html
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
friend)
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
Sweden.
More information about the Gcc-help
mailing list