How to compare the speed between a Java program and its originalFortran version program?

W

www

Hi,

I have translated an old Fortran program into Java program, line by
line. The Java program produces the identical results as Fortran one
does. But Java program does I/O involved with xml parsing a lot.

Now, my customer needs information regarding how slow or fast the Java
program is, compared to its original Fortran program. Can you provide me
some idea on how to get such information?

To complicate my question, I hope to ignore the I/O code in Java
program, only compare the heavy duty computation part. Because Java
program does a lot of xml parsing, very time consuming. Fortran program
does not. So it is unfair to include I/O portion, when compare the two
programs. Can you also give me some idea on how to do that?

Previously, I have posted my question in different description and many
people say that I need profiling. I use Eclipse and I know a little
about TPTP. I don't know TPTP can provide me such information. I thought
it provides the relative execution time of each block of code., like
some method takes 98% time and is obviously a bottleneck.

Thank you very much.
 
O

Oliver Wong

www said:
Hi,

I have translated an old Fortran program into Java program, line by
line. The Java program produces the identical results as Fortran one
does. But Java program does I/O involved with xml parsing a lot.

Now, my customer needs information regarding how slow or fast the Java
program is, compared to its original Fortran program. Can you provide me
some idea on how to get such information?

To complicate my question, I hope to ignore the I/O code in Java
program, only compare the heavy duty computation part. Because Java
program does a lot of xml parsing, very time consuming. Fortran program
does not. So it is unfair to include I/O portion, when compare the two
programs. Can you also give me some idea on how to do that?

Are you interested in giving your customer an accurate description of
the performance of your Java app (in which case, you should probably
include the XML parsing time), or are you interested in giving figures
which demonstrate that the Java app is faster than the Fortran app (in
which case, you should find out what part of the Fortran program is the
slowest, compare that to the Java one, and handwave the rest of the
programs as irrelevant)?

- Oliver
 
L

Lew

The line-by-line production may not make the best use of
a) object-oriented design principles,
b) other Java idioms.

That could negatively impact performance, especially if the "identical
results" included copying any bugs.

Java also has multiple optimization options relating to hotspot compilation
and garbage collection. Realistic benchmarking would require simulating the
typical data load between the two versions. What is typical? That is
non-trivial, as is the game of simulating it.

Also, Java's architecture favors long-running processes within an established
JVM; JVM startup is a significant time eater.

A third contender should be a Java rework of the original algorithm rather
than the original code, or possibly a substitution of a better algorithm.

The problem here is to give the customer information that will actually
benefit them, and products that actually serve them. Coughing up a meager
translation of a FORTRAN program to Java, then running meaningless benchmarks
to try to figure out if you did anything useful is a huge disservice to your
customer.

Make sure the benchmarks measure something that has actual importance, and
make sure the work has real benefits to the customer.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,898
Latest member
BlairH7607

Latest Threads

Top