harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From acoli...@apache.org
Subject Re: Sending native code to the processor at runtime
Date Sat, 14 May 2005 22:58:03 GMT
Matthew French wrote:

>On Fri, 2005-05-13 at 18:23 -0700, acoliver@apache.org wrote:
>>Basically the compiler writes your machine code for you anyhow.  I'm 
>>quite curious about the claims that it achieves 70% of native 
>>performance (which is really quite good) in microbenchmarks.
>Why can a JIT not achieve 110% of native performance? (Assuming that we
>strip out the compile time and compare like with like.)
because it is mathmatically not possible.  Its like giving 110% of your 
best effort.  It is an expression.

>The reason I say 110% is that binary code is usually compiled for the
>lowest common denominator. So x86 code targets a 386, and Sparc binaries
>target UltraSparc v8 or older processors. 
I run gentoo for this very reason. 

>The advantage a JIT has is that it knows exactly where it is being
>compiled, so in theory can make use of as much hardware assistance as it
Achieving parity with native performance would require changes to Java 
itself.  For instance ask the boys at Intel how they
feel about Java's Math implementation being written in Java and the 
bytecode support thereof.  You make compromises for
portability and IN SOME WAYS java is a "least common denominator" 
effort.  If we had full control over the bytecodes it might
be possible to have high level byte codes (Java-style) and low level 
bytecode (basically portable assembler similar to how GCC
does C only even moreso).  Then you could mix compilation to optimize 
for particular platforms, if the lower level instructionset was used
then it would have to be emulated on processors that didn't support 
that.  This might still affect what kinds of native optimization you 
could do
and remember at runtime all of this is perceived performance 
degredation.  Therefore 70% of native performance is quite good.

>Getting this right in practise will take a lot longer. Getting it right
>across many platforms and processors - even more so.
Which should probably not be the immediate goal.  Parity with Sun's JDK 
on mainstream platforms is probably a good first major milestone.


>- Matthew

Andrew C. Oliver
SuperLink Software, Inc.

Java to Excel using POI
Commercial support including features added/implemented, bugs fixed.

View raw message