Java for Games: too slow?
<strong><br/><br/></strong>There is a mistaken belief amongst many commercial and hobbyist games developers that java is not suitable for games development. This is based on data that is 5 to 10 years old, and a misunderstanding of Java. <p></p><p>If you take a C++ program, compile it, and wait ten years, it will still run just as slowly with all the same bugs it had 10 years previously. If you do the same with a java program, you will often find it runs faster - on the same hardware - ten years later, and with fewer bugs. </p><p>Up until 1996, Java was very slow. Until 1998, it was slow. Until 2000, it was fast enough for most apps, but still on average only 50%-75% of the speed of C++. </p><p>Since around 2002, Java on average is less than 5% slower than the best C++ code. For most applications (including games) java is within 1% of the speed of C++ code; many of the improvements of the last few years have concentrated on making up the performance gap, so that now - finally! - Java is a realistic practical alternative even in games development - where RAW SPEED is usually the most important factor. </p><p>Note: Java also finally has full access to hardware-accelerated OpenGL; see the JGF tech page 3D graphics section <br/></p> 尝试着翻译了一下: <p></p><p>JAVA对于游戏:太慢了?</p><p>在很多商业的和沉溺于某中癖好的游戏开发者中有一种错误的信仰,就是JAVA不适合于游戏开发。这种错误的信仰是以5到10年前的旧数据为基础的,并且是对JAVA的误会。</p><p>如果你用C++编一个程序,之后编译它,然后等上十年,那么这个程序仍然会像十年前一样,运行的一样慢,带有先前一样多的BUG。如果你用JAVA编写同一个程序,你常常会发现,十年以后,在相同硬件的基础上,它运行的更快了,并且含有更少的BUG。</p><p>直到1996年,JAVA仍是很慢的。到了1998年,它速度慢。到2000年,对于大多数应用程序来说它已经足够快了,但平均速度仍只有C++的50%-75%。</p><p>从2002年左右开始,JAVA的平均速度只比设计的最好的C++代码慢5%。对于大多数应用程序(包括游戏),JAVA的速度比C++代码慢1%;最近几年所取得的多数改进都集中在缩短性能差距,因此现在——不可否认地——JAVA是现实实用的二中择一的选择,甚至在游戏开发领域——一个通常把RAW SPEED作为重要参考因素的地方。</p><p>注意:JAVA还有对OpenGL硬件加速的完全访问;参考JGF tech page 3D图形部分。</p>
页:
[1]