Matthew French wrote:
On Fri, 2005-05-13 at 18:23 -0700, [EMAIL PROTECTED] wrote:because it is mathmatically not possible. Its like giving 110% of your best effort. It is an expression.
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.)
The reason I say 110% is that binary code is usually compiled for theI run gentoo for this very reason.
lowest common denominator. So x86 code targets a 386, and Sparc binaries
target UltraSparc v8 or older processors.
Achieving parity with native performance would require changes to Java itself. For instance ask the boys at Intel how theyThe 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 can.
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.
Which should probably not be the immediate goal. Parity with Sun's JDK on mainstream platforms is probably a good first major milestone.Getting this right in practise will take a lot longer. Getting it right across many platforms and processors - even more so.
-andy
- Matthew
-- Andrew C. Oliver SuperLink Software, Inc.
Java to Excel using POI http://www.superlinksoftware.com/services/poi Commercial support including features added/implemented, bugs fixed.
