Why is Java faster when using a JIT vs. compiling to machine code?

前端 未结 10 1639
轻奢々
轻奢々 2020-12-12 12:27

I have heard that Java must use a JIT to be fast. This makes perfect sense when comparing to interpretation, but why can\'t someone make an ahead-of-time compiler that gener

10条回答
  •  感情败类
    2020-12-12 13:28

    I think the fact that the official Java compiler is a JIT compiler is a large part of this. How much time has been spent optimizing the JVM vs. a machine code compiler for Java?

提交回复
热议问题