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

  • From: Ryan Hanlon <ryanh@xxxxxxxxxx>
  • To: gameprogrammer@xxxxxxxxxxxxx
  • Date: Mon, 07 Mar 2005 13:50:55 -0800

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.  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.
>
>  
>

I've noticed that people who say Java code is necessarily slower than 
C/C++ code often also say the same thing about truly interpreted 
languages like Perl, Python, etc.  (By the way Java not quite the same 
thing as an interpreted language).  It's a common misconception that 
interpreted languages are significantly slower than compiled ones.  The 
main reason for that I think is that interpreted languages simply make 
it easier for programmers to write horribly inefficient code.  They can 
handle lots of inconveniences behind the scenes, often at a cost, but 
that doesn't mean you can't write fast code in those languages.  If the 
interpreters are written decently (as I'm sure most agree Perl and 
Python are), reasonably fast code can be written in any language.  If 
you're depending on the interpreter/compiler to make your code fast, 
you're not writing efficient code :)

Related to that, no matter what language you choose, it's always 
possible to compile it into machine code.  It's just a question of what 
tools are available and how hard or easy it is to use them.  So no 
language is really "faster" than another language.  But some code is 
faster than other code :)

Ryan

>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: