Report from JavaOne: High Performance: Writing a Sony PlayStation Emulator in Java

From reading the thread, they are using a JIT and many Java performance tricks, so I could see how it works. However, I imagine it's still 20% to 50% slower then comparable C++ code, but computers are so fast these days that I'm a PS1 emulator would perform fine.
 
DudeMiester said:
From reading the thread, they are using a JIT and many Java performance tricks, so I could see how it works. However, I imagine it's still 20% to 50% slower then comparable C++ code

All current-day JVMs and interpreted/byte-code languages use Just-In-Time compilation to native machine instructions. There is no magic in the code to support JIT. As in any programming language, one should always choose reasonable algorithms for their solutions. There is no reason for this Java app to be more than 10% slower than comparable C++ code.
 
The emulator is basically using the JVM as a platform in the end. Which is really smart, since you're running a large body of code, which will likely take, in key areas, different code paths, the JVM's dynamic inlining and outlining of methods alone is a big win.
 
BRiT said:
There is no reason for this Java app to be more than 10% slower than comparable C++ code.

You mean once it finally loaded and ran 2-3 times, surely.

Java & high performance... ROTFLMAO!!!
 
Back
Top