Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / April 2007

Tip: Looking for answers? Try searching our database.

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

Thread view: 
www - 10 Apr 2007 15:41 GMT
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.
Oliver Wong - 10 Apr 2007 16:30 GMT
> Hi,
>
[quoted text clipped - 11 lines]
> 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
Lew - 11 Apr 2007 07:37 GMT
>> 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.

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.

Signature

Lew



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.