HappySqurriel said:
The primary considerations for producing high performance code is using the correct data-structures and algorithms, not on hand-optimization of byte-code that is better handled by a compiler. Even then, the 0.1% of code that you would (potentially) want to write in assembly to increase performance can be (mostly) written by the console manufacturer and provided as library to your VM. Beyond this, people have been benchmarking C++ vs Java for nearly a decade with results that demonstrate that JIT compilation of Java byte code into machine-code produces similar (overall) results to compiling C++ code into machine-code; with each language having its own advantages in a handful of areas. Google has already taken this approach with Android, and I don't think many people would say there has been noticeable performance problems on those devices because their games are java based ...
With that said, I'm not saying that this upcomming generation will move towards a virtual machine approach but I'm certain the following generation will ... |
Google went that route as apps have to be as hardware agnostic as possible as there is a wide veriaty of hardware that it has to run on, running in a virtual machine helps make apps more portable and less prone to conflicts. But they will always incur a performance penalty vs native even the best virtual machines today have a 4-6% CPU performance penalty under ideal situations and in the real world it can be up to a 40% penalty so there is no way consoles will use them unless they literally have performance to burn, or developers for whatever reason need their console games to run on diverse hardware which means you lose the advantage of optomising for a single hardware set and running it direct to metal or at least to very low level APIs (which doesn't require hand optomised code BTW console manufacturers supply specialized compilers).
Oh and high performance apps on Android like games actually run native (or at least parts of them that require high performance) as the virtual machine is far to slow.
Here is a benchmark of Dalvik vs native on android

@TheVoxelman on twitter







