Jump to content
  • Advertisement
Sign in to follow this  
MasterQ

Java is fast?

This topic is 4431 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I read an article that said java is just as fast as C++ when it uses JIT compiling. It gave some tests and java actually outperformed C++. I've also noticed many video games like Runescape are being programmed in java. Will languages like java, C#, and VB.NET take over the game industry in the coming years? Now that the speed is just as fast as C++ there may no longer be any reason to use C++, just as there is no longer a need to write programs in assembly or machine language.

Share this post


Link to post
Share on other sites
Advertisement
Quote:
Original post by MasterQ
I read an article that said java is just as fast as C++ when it uses JIT compiling. It gave some tests and java actually outperformed C++.

I've also noticed many video games like Runescape are being programmed in java. Will languages like java, C#, and VB.NET take over the game industry in the coming years? Now that the speed is just as fast as C++ there may no longer be any reason to use C++, just as there is no longer a need to write programs in assembly or machine language.


I sure HOPE so. I wouldn't hold my breath tough. The games industry has an history of being late adopters and conservative in their choice of (software) technology.

[Edited by - jfclavette on April 16, 2006 6:11:47 PM]

Share this post


Link to post
Share on other sites
Many companies have their existing code bases written entirely in C++. That's why companies are able to crank out sequels so fast; code reuse. I've worked with C++, C#, and Java, and I hope that the later two eventually replace the first one as a standard, but as jfclavette said, don't wait up on it.

Share this post


Link to post
Share on other sites
Java is definitely fast for most modern desktop games. For example, here are some links to some great 3d games developed in Java:

http://www.runescape.com
http://www.bytonic.de/html/jake2.html
http://www.oddlabs.com/
http://www.megacorpsonline.com/
http://www.wurmonline.com/
http://www.flyingguns.com/

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
What's more likely is that C/C++ will be here to stay, but will be supplemented by s'more useful libraries and some manner of scripting language (like perl/python/ruby). If you don't believe me, just look at all the current popular AAA game engines in use, like Unreal Engine or Half-Life's engine. The engine and "fast stuff" is written in C/C++ and a bit of assembly, and the gameplay and GUI code is in a scripting language. Pretty much everything but bottlenecks and deep engine stuff (graphics, physics, etc) can do without C/C++, and so we'll probably be seeing a steady rise in more abstract languages in the games world. Hey, if it worked for software outside the game industry, then it can work for us too. Increased productivity also means less unpaid overtime and fewer crunches!

Share this post


Link to post
Share on other sites
Quote:
Original post by MasterQ
I read an article that said java is just as fast as C++ when it uses JIT compiling. It gave some tests and java actually outperformed C++.

I've also noticed many video games like Runescape are being programmed in java. Will languages like java, C#, and VB.NET take over the game industry in the coming years? Now that the speed is just as fast as C++ there may no longer be any reason to use C++, just as there is no longer a need to write programs in assembly or machine language.


Interesting. Could you please post the article link that discussed this JIT compilation? I wasn't aware that Java supported JIT compilation. Are you sure you were not thinking of J#? I know IBM has redesigned the VM to employ this technique and that there are many projects on the web doing the same thing. Now, it has been some time since I last touched the language. Maybe the current installment of the Java runtime environment does use JIT compilation.

Share this post


Link to post
Share on other sites
I don't mean to be too presumptious, but if you set a C++ compiler to make optimizations like the JVM/JIT, I'm willing to bet you that Java will no longer be "faster than C++".
*Gets whacked*

Share this post


Link to post
Share on other sites
Java was never meant to be... fast... It was meant to be a flexible platform where you could execute the same application in any environment. In this, it succeeds quite well. If you need something to run anywhere, you write it in Java.

To use Java for anything else is going to be a painfull experience except for the most rudimentary applications. It's good for networking tasks. Limewire is proof of that. But I still haven't seen anything written fast in it. Why is netbeans so slow?

Share this post


Link to post
Share on other sites
Java was designed to be a cross-platform "programming language" that didn't have to use platform specific compilers/optimizers or anything. Hence the Java VM - which in my eyes makes Java more of a scripting language than a programming language which in turn is why it'll never be as fast as c/c++ etc.

As for the future of game programming i think C# will be the next big thing. Hell, not only the next big thing in the game industry, it's likely the new C.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Quote:
Original post by Deception666
Quote:
Original post by MasterQ
I read an article that said java is just as fast as C++ when it uses JIT compiling. It gave some tests and java actually outperformed C++.

I've also noticed many video games like Runescape are being programmed in java. Will languages like java, C#, and VB.NET take over the game industry in the coming years? Now that the speed is just as fast as C++ there may no longer be any reason to use C++, just as there is no longer a need to write programs in assembly or machine language.


Interesting. Could you please post the article link that discussed this JIT compilation? I wasn't aware that Java supported JIT compilation. Are you sure you were not thinking of J#? I know IBM has redesigned the VM to employ this technique and that there are many projects on the web doing the same thing. Now, it has been some time since I last touched the language. Maybe the current installment of the Java runtime environment does use JIT compilation.


Where have you been, man? Java has had JIT compilers for a long time.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!