> One of my colleagues has bid a project proposing to convert some Fortran 77
> code to C++ claiming it will run faster. I dispute this but do not have hard
> facts at hand. Can someone point to a web site with comparison benchmarks?
> Or, tell me about personal experience? A Fortran to C comparison would also be
> useful.
see e.g. IEEE Antennas and Propagation magazine.
J.E. Moreira, S.P. Midkiff, M. Gupta,
'A Comparison of JAVA, C/C++ and FORTRAN for Numerical Computing'
Vol 40, No 5 Oct 1998, pp 102 -- 105
Generally it says if you know the right switches for your compiler,
and the compiler is very good, you get about the same out of
both. (was on a IBM SP I guess). Optimized libraries (ESSL in
that case) beat every language.
Own experience: we have a code running on a vector computer,
the speed when using both compilers with all available and
applicable switches gets about the same. BUT, F90 is
easier to program (acknowledges even the C programmer),
and some switches are rather obscure.
If you have a lot of matrix/vector operations, be sure that
the C-compiler can handle aliasing/non-aliasing issues
as you want it. The above code is about 30 to 40 % slower
with C without switches to define all arrays as non-aliasing.
chers
juergen
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|