Re: Java (bytecode) execution speed
- From: JT <jackt123@xxxxxxxxx>
- Date: 30 Apr 2007 09:56:32 -0700
On Apr 30, 3:48 pm, Lee <l...@xxxxxxxxx> wrote:
I had thought that bytcode was, so to speak,
the "machine code" of the Java Virtual machime.
It is.
If that were true, I can't see how there would be any room
The Java Virtual Machine Specification is a precise document
on the meaning of bytecodes. So JIT compilers simply
attempt to produce native binaries that have the same behavior
as the bytecode.
I don't see how the JVMS prevents that.
(or any need) for further compilation of the byte code.
The need is speed. Interpretation is much slower
than native execution.
But if the bytecode were just a portable abstraction, something "above"
the JVM's machine language but "below" the java source language
No. The byte code is the native machine code of the JVM.
My problem is that in my conception, when it is a question of running a
virtual machine, the "compilation" would be to that vm's "machine"
language
The JIT does not compile to to the VM's machine language.
In fact, the JIT always compiles to the CPU's machine language.
and thats as "low" as you could go.
Why? The JVM itself has full access to the Operating System
that the JVM is running on. Whenever you have native methods
(eg. some of the GUI methods and the IO methods...), the JVM
will have to invoke the corresponding services from the Operating
System.
So, a JVM could invoke a JIT to translate frequently-executed code
into a suitable binary format that the OS can execute.
I see no problem there. (And as you noted, there are many
powerful Java JIT out there)
- JT
.
- References:
- Java (bytecode) execution speed
- From: Lee
- Re: Java (bytecode) execution speed
- From: Lee
- Java (bytecode) execution speed
- Prev by Date: web services without upseting current set up
- Next by Date: Re: LineUnavailableException when trying to play .wav file
- Previous by thread: Re: Java (bytecode) execution speed
- Next by thread: Re: Java (bytecode) execution speed
- Index(es):
Relevant Pages
|