[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: comparison between native gcj and bytecode



The following was originally sent as private mail to Erik by myself, but
since the discussion has leaked back into the list, I thought I'd forwrad
the relevant section to the list too.

On Sun, Jan 05, 2003 at 12:41:42PM +0100, Erik Poupaert wrote:
> There are reasons to believe that gcj already beats the JDK with regards to
> performance. And the future outlook is that ahead of time compilation still
> has very good potential left for optimization, while just in time
> compilation may very well already have hit its limits.

Whilst I agree that ahead of time compilation is always going give more room
for compiler optimizations, I disagree with the assertion that just in time
compilation is anywhere close to hitting its limits. Work with the Self
virtual machine demonstrates that just in time compilation, with appropriate
dynamic recompilation for heavily used chunks of code, can be used to make
very dynamic untyped languages extremely fast. One good example is a
Smalltalk interpreter written in Self that ran even faster than some of the
better Smalltalk compilers. Look for "Self includes: Smalltalk" by Mario
Wolczko for evidence of this.

Given that Java is a statically typed language, there is plenty of room left
for using similar techniques to make JVMs even faster. Sun seem to have
aquired the leading thinkers behind the Self VM, and have only just begun
applying these techniques to their JVM to get the hotspot JVM. There are
lots of techniques used in the Self VM that have yet to make it into hotspot
JVM, so we can only really expect it to get faster still. These techniques
are mostly relevant to symbolic processing, so will help SableCC, but is
also unlikley to be shown up by comparisons that are geared towards number
crunching.

-- 
Jon Shapcott <eden@cluefactory.org.uk>
"This is the Space Age, and we are Here To Go" - Wlliam S. Burroughs