[NTLUG:Discuss] Transport tool - opinions
Greg Edwards
greg at nas-inet.com
Thu Mar 27 11:43:09 CST 2003
Stephen Davidson wrote:
>
> When in DEVELOPMENT MODE, which translates to running non-optimized
> translated byte codes, yes, Java is most definately not the fastest
> thing around. With the latest JDK (1.4), with optimized precompiled
> code, Java is today running at speeds comparable to average written C.
> Once the RunTime Profiler has had a chance to kick in, Java code runs as
> fast as well written C code (sometimes faster, but that is in special
> cases where writing object-oriented code is actually a better solution:
> example would be for BioSystem Modeling). And when it comes to the
> Visual C/C++ code, Java kicks.
>
Sorry Stephen but that dog won't hunt!!
I don't want to start a religious war here but, no Java is NOT in the
performance league that C is in. Yes Java is well ahead of Perl and
Tcl/Tk but I'm not sure on Python or Ruby. Java is closer to C++ in
performance but that's because their both Object Oriented languages.
I read that article and the testing was skewed toward a major weakness
in C involving dynamic memory. Java (and other OOP languages) do
internal heap management while C relies on the OS. C does not give you
dynamic memory management automatically because that is a tool not a
feature. The advantage to the C approach is that if you don't need it
then your program is not burdened with the overhead. The disadvantage
is that if you do need it you have to write it, or use one you've
already written.
Java has two major issues that cannot be overcome when compared to C.
First Java is OO and C is not. Second Java is interpreted and C is not.
Even compiled Java is interpreted at some levels. Any language that
does data type binding and/or operand overload binding at run time is by
default interpreted. Any OO language will have the disadvantage of an
expanded stack for function calls. Passing call by value objects (OO's
default) is simply more expensive than call by reference.
Yes object oriented languages have advantages over procedural languages
but the first price paid for those advantages is program performance.
The same type of performance issues exist in the debate between
assembler and C. If you really want the best program performance
Assembler is a better choice than C which is better than C++ which is
better than Java which is better than ....... For pure number crunching
Fortran is better than C and APL is better than Fortran for matrix work.
Don't get me wrong I think OOP has it's place and is a very valuable
tool. But Java is NOT the single solution that many want to see. Sorry
but the single language solution is a pipe dream that will not happen.
Java may well be the correct single language internet browser client
side solution but that is only one piece of a very big puzzle.
--
Greg Edwards
New Age Software, Inc. - http://www.nas-inet.com
======================================================
Galactic Outlaw - http://goutlaw.nas-inet.com
The ultimate cyberspace adventure!
More information about the Discuss
mailing list