I've not used gcj so I can't speak from experience, but the benchmarks [1] don't make it look faster. HotSpot is pretty smart, and the Sun JVM is fairly ridiculously fast. Memory efficient? No, but fast! ;)

Older benchmarks [2] seem to claim otherwise, though they compare to much older JVM versions too.

Remember that with each release of the JVM all Java code everywhere gets faster, but your natively compiled gcj code will be stuck at the same performance it was when gcj ran over it with it's static optimizations.

Also think about Lua, which is being used by Adobe to power the entire UI in Lightroom, WoW and Second Life and many other things. And the JVM completely smokes [3] it.

I'd say to give the Sun JVM a shot and not worry about speed until you can really show it's too slow.

[1] http://shootout.alioth.debian.org/gp4/benchmark.php?test=all&lang=gcj
[2] http://jmvanel.free.fr/perf/java-cpp.html
[3] 
http://shootout.alioth.debian.org/gp4/benchmark.php?test=all&lang=lua&lang2=java

- Elliott

On Jan 15, 2009, at 10:35 PM, Edmund Kohlwey wrote:

Hi,
I'm doing a research project this Spring which is based on some work that I've done for my job recently. The research project itself involves visualization of large graphs/networks, and as such has involved some OpenGL programming. I've already got a large codebase which is in Java, and I was hoping to reuse it for my research project. I am, however, concerned about performance of the JVM, and I've had trouble finding information about the Sun JVM's performance vs, say, libgcj. Does anyone know anything about the performance of libgcj (or any other native code java compiler) vs the Sun Java VM? Perhaps someone could recommend some resources to investigate?

-Ed

Reply via email to