JIT vs Interpreters

前端 未结 7 1207
一生所求
一生所求 2021-01-29 21:03

I couldn\'t find the difference between JIT and Interpreters.

Jit is intermediary to Interpreters and Compilers. During runtime, it converts byte code to machine code (

7条回答
  •  北荒
    北荒 (楼主)
    2021-01-29 21:38

    Jit is intermediary to Interpreters and Compilers. During runtime, it converts byte code to machine code ( JVM or Actual Machine ?) For the next time, it takes from the cache and runs Am i right?

    Yes you are.

    Interpreters will directly execute bytecode without transforming it into machine code. Is that right?

    Yes, it is.

    How the real processor in our pc will understand the instruction.?

    In the case of interpreters, the virtual machine executes a native JVM procedure corresponding to each instruction in byte code to produce the expected behaviour. But your code isn't actually compiled to native code, as with Jit compilers. The JVM emulates the expected behaviour for each instruction.

提交回复
热议问题