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

Discussion in 'Java' started by www, Apr 10, 2007.

  1. www

    www Guest

    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.
    www, Apr 10, 2007
    #1
    1. Advertising

  2. www

    Oliver Wong Guest

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

    "www" <> wrote in message
    news:evg7n7$lr0$...
    > 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
    Oliver Wong, Apr 10, 2007
    #2
    1. Advertising

  3. www

    Lew Guest

    Oliver Wong wrote:
    > "www" <> wrote in message
    > news:evg7n7$lr0$...
    >> 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.

    --
    Lew
    Lew, Apr 11, 2007
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. V Green
    Replies:
    0
    Views:
    823
    V Green
    Feb 5, 2008
  2. PA Bear [MS MVP]
    Replies:
    0
    Views:
    929
    PA Bear [MS MVP]
    Feb 5, 2008
  3. thunk
    Replies:
    1
    Views:
    292
    thunk
    Mar 30, 2010
  4. thunk
    Replies:
    0
    Views:
    453
    thunk
    Apr 1, 2010
  5. thunk
    Replies:
    14
    Views:
    598
    thunk
    Apr 3, 2010
Loading...

Share This Page