> Date: Fri, 26 Mar 99 14:42:19 CST
> From: [log in to unmask]
> 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.
I hope someone else can contribute some hard data; all I have is some personal
experience. The only way a C++ rewrite is going to be faster is if the F77
code already performs badly on the target system. This doesn't have to imply
that the code is badly written. Old code that has been tuned for vector
machines tends to run pretty poorly on cache-based microprocessors. Just
rearrange the order of operations to make it more cache friendly can have a
large impact on performance.
In general, it is often possible to significantly improve the performance of
anyy code by rewriting it from scratch. You often are smarter the second (or
Nth) time around. This isn't a lnaguage issue.
A relatively direct translation from F77 to C will almost certainly _not_ be
faster. Redesigning, restructuring and reimplementing the code from scratch
is not anywhere the basis for a fair comparison.
Another thing to consider is the skill of the programmer. If your colleague is
a better C++ programmer than the original authors were F77 programmers, then
it wouldn't be surprising if the new C++ code was better than the original F77
code. Again, this haslittle to do with language performance.
It's very hard to do fair comparisons, which is why I have no hard data to give
you.
-david
> Harry R. Millwater, Ph.D.
> Probabilistic Mechanics and Reliability Section
> Southwest Research Institute, San Antonio, TX
> (210) 522-2006 Voice
> (210) 522-3042 Fax
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|