public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* gcc_debian_linux_code_on_freebsd
@ 2000-05-22 23:55 Hans Weber
  2000-05-23 12:28 ` gcc_debian_linux_code_on_freebsd Alexandre Oliva
  0 siblings, 1 reply; 3+ messages in thread
From: Hans Weber @ 2000-05-22 23:55 UTC (permalink / raw)
  To: gcc-help

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1642 bytes --]

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.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: gcc_debian_linux_code_on_freebsd
  2000-05-22 23:55 gcc_debian_linux_code_on_freebsd Hans Weber
@ 2000-05-23 12:28 ` Alexandre Oliva
  2000-05-23 12:39   ` gcc_debian_linux_code_on_freebsd Jeffrey A Law
  0 siblings, 1 reply; 3+ messages in thread
From: Alexandre Oliva @ 2000-05-23 12:28 UTC (permalink / raw)
  To: Hans Weber; +Cc: gcc-help

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 608 bytes --]

On May 23, 2000, Hans Weber <weber@mt.luth.se> wrote:

> 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?

1) upgrade both to GCC 2.95.2 and try again

2) see if they're configured to optimize for the same CPU variant
(e.g., i586 or i686)

-- 
Alexandre Oliva    Enjoy Guaraná, see http://www.ic.unicamp.br/~oliva/
Cygnus Solutions, a Red Hat company        aoliva@{redhat, cygnus}.com
Free Software Developer and Evangelist    CS PhD student at IC-Unicamp
oliva@{lsd.ic.unicamp.br, gnu.org}   Write to mailing lists, not to me

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: gcc_debian_linux_code_on_freebsd
  2000-05-23 12:28 ` gcc_debian_linux_code_on_freebsd Alexandre Oliva
@ 2000-05-23 12:39   ` Jeffrey A Law
  0 siblings, 0 replies; 3+ messages in thread
From: Jeffrey A Law @ 2000-05-23 12:39 UTC (permalink / raw)
  To: Alexandre Oliva; +Cc: Hans Weber, gcc-help

  In message < or8zx1kqz4.fsf@tamanduatei.dcc.unicamp.br >you write:
  > On May 23, 2000, Hans Weber <weber@mt.luth.se> wrote:
  > 
  > > 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?
  > 
  > 1) upgrade both to GCC 2.95.2 and try again
  > 
  > 2) see if they're configured to optimize for the same CPU variant
  > (e.g., i586 or i686)
He could also be getting different stack alignments which could have a
significant impact on the speed of the code if he's doing floating point.
jeff

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2000-05-23 12:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-05-22 23:55 gcc_debian_linux_code_on_freebsd Hans Weber
2000-05-23 12:28 ` gcc_debian_linux_code_on_freebsd Alexandre Oliva
2000-05-23 12:39   ` gcc_debian_linux_code_on_freebsd Jeffrey A Law

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).