JIT compiler and execution

I am confused with the JIT compiler,

  • What is a JIT compiler?
  • Does the JIT compiler compile byte codes before each execution, or every time the JVM boots?
+3
source share
4 answers

JIT means "Just In Time". This is a compiler that converts Java bytecode into native machine code as your program runs.

Sun JIT will not compile all of your bytecode before each run of the Java program; it contains very complex logic to decide when to compile parts of the bytecode, one of the criteria that it uses is how often the code is executed.

. HotSpot () .

+4

JIT- , Java- , .

JIT , , , .

JIT , Java . , .

+1

Just-in-time (JIT) - , - Java (, , ) , .

JIT- , . JIT- , Java Java Native Interface (JNI) JIT, , . java.lang.Compiler JIT. JIT invoker. Sun ACC_MACHINE_COMPILED, , . ( JVM) JIT .

ACC_MACHINE_COMPILED, Sun.

, , , JIT ( JVM) . JIT , , JIT. , , . JIT , , , .

JIT , Java, Null . , JIT , , - , . , Java, . JIT, , , , Null .

: http://java.sun.com/developer/onlineTraining/Programming/JDCBook/perf2.html

+1

The JIT compiler was an external compiler that ships with Java 1.1. This term is now outdated. Java comes with the HotSpot JVM, which compilation is built into.

0
source

Source: https://habr.com/ru/post/1751426/


All Articles