g++ vs g77 ?


Subject: g++ vs g77 ?
From: Vanja Bucic (vanjab@UDel.Edu)
Date: Fri Feb 25 2000 - 14:30:13 MST


Hi,
I have two programs that were written identically, with same functions,
structure, variables itd. One was written in Fortran, and one in C++.
Programs are quite short with only 3-4 functions being called several
million times. When I compile and run them, the C++ version gets
executed in 12.3 seconds, while fortran version finishes in 8.3 seconds.
I was expecting to get very close results, I mean it is the same
compiler and same machine. I used nothing C++ or fortran specific, just
'for' loops, basic math(*, / +), and arrays.
Where does the difference come from? How can I get close results?

compiler : egcs 1.1.2
machine: PowerPC G3 233



This archive was generated by hypermail 2a24 : Wed Mar 01 2000 - 00:07:02 MST