Re: Mars Rover Controlled By Java

Bjorn-Ove.Heimsund_at_uib.no
Date: 01/21/04


Date: 21 Jan 2004 16:26:07 GMT

In comp.arch Jan C. Vorbrüggen <jvorbrueggen@mediasec.de> wrote:
>> For some large
>> scale computations, my Java codes perform identical to Fortran codes,
>
> Really? Even if you compile with optimization?

Yes, but I might add that the things I do are not easily vectorizable
(sparse matrix calculations). For dense array computations, a good
compiler can do fancy unrolling tricks and other things which is not
(yet) available in Java nor in Hotspot.

>> with the added benefits of readability and maintainability, not to
>> mention trivial cross-platform deployment (from my desktop to the local
>> supercomputer, with excellent scalability).
>
> I consider a reasonably well-written F95 program to be very maintainable
> and more portable than Java - if only for the fact that there's only one
> F95 standard all compilers are written to, while there are several

It's very easy to create unmaintainable code in any language, Java is no
exception. It's just that Java doesn't have a 40 year legacy baggage,
and encourages good design practices. Java seems to be well recieved
in some computer science institutes as well, especially as an
introduction to OO programming.

On the portability side, I have had issues porting some F95 codes
between compilers, both of which had different ideas how the standard
were to be interpreted (and the compilers were quite new too). F77
compiles nicely, though.

> incompatible (in various ways) Java "standards" around, not to mention
> the different thread semantics of different implementations.

Since Java 1.2, I have yet to encounter any issues with thread
implementations, be it on AIX, Solaris, Linux or Windows. There are
of course some more issues relating to thread local storage and
caching, but the semantics of this is being worked out (for Java 1.5)

>> I might add that Java w/Hotspot quite often outperforms vanilla C
>> codes, it's only when adding lots of optimization flags to the compiler
>> that the performance gap closes.
>
> For any modern compiler of a 3GL language, not compiling with (the equivalent
> of) -fast is grossly negligent.

Agreed. But many folks around here run their codes compiled with
"f77 -g" (not that I do that, of course :-)

-- 
Bjørn-Ove Heimsund
Centre for Integrated Petroleum Research
University of Bergen, Norway


Relevant Pages

  • Re: Mars Rover Controlled By Java
    ... >> scale computations, my Java codes perform identical to Fortran codes, ... available in Java nor in Hotspot. ... > I consider a reasonably well-written F95 program to be very maintainable ... between compilers, both of which had different ideas how the standard ...
    (comp.object)
  • Re: Mars Rover Controlled By Java
    ... >> scale computations, my Java codes perform identical to Fortran codes, ... available in Java nor in Hotspot. ... > I consider a reasonably well-written F95 program to be very maintainable ... between compilers, both of which had different ideas how the standard ...
    (comp.programming)
  • Re: Mars Rover Controlled By Java
    ... >> scale computations, my Java codes perform identical to Fortran codes, ... available in Java nor in Hotspot. ... > I consider a reasonably well-written F95 program to be very maintainable ... between compilers, both of which had different ideas how the standard ...
    (comp.lang.java.programmer)
  • Re: Mars Rover Controlled By Java
    ... >> scale computations, my Java codes perform identical to Fortran codes, ... available in Java nor in Hotspot. ... > I consider a reasonably well-written F95 program to be very maintainable ... between compilers, both of which had different ideas how the standard ...
    (comp.theory)
  • Re: After Java, what next?
    ... any language like Java but with a prettier syntax will prevail. ... expressions and properties; ... already extant for contemporary compilers. ...
    (comp.lang.java.advocacy)