Roedy has a point. Posting comments like "If you aren't interested in
WORM and you want speed, you'd be better off ditching Java in favour
of C++ (or similar)." to a Java programming group is not very
informative if you can't state why you think so and back it up with
benchmarks.
The paragraph which followed that comment *did* expand my opinions
on the matter. As indeed did the lengthy posting which followed. As
for benchmarks, I didn't think they were necessary in this instance,
as the point I was responding to was about using a native compiler to
overcome any potential shortcomings in Java's speed - ergo the fact
that Java might have issues in that area (necessitating a native
compiler) was implicit in the discussion.
Perhaps I didn't make clear enough in the second para that not
resorting to 'tricks' to overcome language shortcomings was merely
an opinion - not quoted as fact/law - as indeed are most comments
on Usenet. It is an ethical issue more than anything else, and as
such I'm not sure how one would go about 'benchmarking' ethics.
Even so, the correct response is surely to query the comments or
ask for clarity, not to flame. (As Roedy points out, this is not
an advocacy group.)
Quoting an report from 1997 isn't helping much. If you
haven't noticed, Java has evolved quite a bit in the last couple of
years.
Well it would seem that neither of us have posted benchmarks to
prove that Java (run via a JVM) is or is not generally faster than
natively compiled code. I merely hold *an opinion*, based upon
nothing more than experience and anecdotal evidence, that Bytecode/
JVM beats native code only in a handful of very specific circum-
stances. I was under the impression that this was a generally held
opinion within the intelligent (ie. not fanboy) Java circles.
Perhaps I am wrong. (Which begs the question, why are people
suggesting resorting to native compilers if the JVM is generally
faster?) I know that in theory at least Java *can CONSISTANTLY*
beat native code - as the article I mentioned proves - but I was
unaware that anyone was seriously suggesting it had reached that
stage yet. (Or indeed that it would do so for some time!)
Even so, I still maintain that running Java through native compilers
(producing a .EXE, for example) goes against what the language stands
for. I find it ironic that Sun had to battle Microsoft to defend
Java's platform neutrality, and here are a handful of Java programmers
willfully surrendering it! If you know you need to compile to .EXE
then you should pause to question whether Java is the right tool for
the job at hand - *regardless* of whether this is a speed issue. But
there is no right or wrong here, just 'ethics', so no benchmarks can
save us...
-FISH- ><>