What does a just-in-time (JIT) compiler do?

后端 未结 18 1715
伪装坚强ぢ
伪装坚强ぢ 2020-11-22 12:42

What does a JIT compiler specifically do as opposed to a non-JIT compiler? Can someone give a succinct and easy to understand description?

18条回答
  •  囚心锁ツ
    2020-11-22 13:03

    JIT compiler only compiles the byte-code to equivalent native code at first execution. Upon every successive execution, the JVM merely uses the already compiled native code to optimize performance.

    Without JIT compiler, the JVM interpreter translates the byte-code line-by-line to make it appear as if a native application is being executed.

    Source

提交回复
热议问题