[gameprogrammer] Re: Fast development over multiple platforms, which language?

  • From: Bob Pendleton <bob@xxxxxxxxxxxxx>
  • To: Gameprogrammer Mailing List <gameprogrammer@xxxxxxxxxxxxx>
  • Date: Mon, 07 Mar 2005 13:51:23 -0600

On Mon, 2005-03-07 at 13:24 -0600, brianevans wrote:
> At 01:02 PM 3/7/2005, you wrote:
> >You asked for opinions, so here's what I have:
> >
> >First, last I heard was that "Java is slower than C++" is a rumor, and
> >the only ACTUAL experiment performed showed that they're the same
> >speed-wise in most things (Java did better in some areas, C++ better in
> >others, but only by small amounts each time).
> 
> First of all, Java is interpreted, so it never can be as fast as a 
> language, such as C++, compiled into native code CAN be.  

Sorry, but no, Java is a compiled language. It is normally compiled to a
virtual machine code, and not to the machine code of a specific
processor. But, it can be compiled directly to native machine code. The
virtual machine code generated by a Java compiler can be interpreted, or
it can be recompiled into native machine code. The majority of Java run
times compile Java byte code into native machine code. You might say
that Java is a twice compiled language :-)

The result is that Java on typical computers runs as compiled native
machine code and is just as fast as any other compiled language running
on those machines. OTOH, if you are willing to give up speed for space,
you can run Java on a virtual machine in a tiny amount of memory. The
best of both worlds... or the worst depending on your point of view.

The problem with using Java on the web is that the Java virtual machine
in IE sucks. It is ancient, has no modern Java features, and is sloooow.
Gee, didn't MS get sued, and lose, for its deliberate attempt to destroy
Java? Why yes, they did. Paid Sun a billion or so for their nasty dead.

                        Bob Pendleton

> But if all you're 
> doing is handing off to native code libraries such as OpenGL, you may not 
> get much of a performance hit.  But that does not make Java itself fast 
> compared to native code, and it just cracks me up every time someone uses 
> Java and "fast" in the same sentence.
> 
> It can be fast enough, however, and I guess that's all that matters in this 
> day and age of 3ghz processors. :)
> 
> brian.
> 
> 
> 
> 
> ---------------------
> To unsubscribe go to http://gameprogrammer.com/mailinglist.html
> 
> 
> 



---------------------
To unsubscribe go to http://gameprogrammer.com/mailinglist.html


Other related posts: