Now that web development doesn't use jsp, why does jvm compile (jit), dynamically instead of compiling (aot) in advance?

as mentioned above, I understand that the benefits of runtime compilation can be that you can save startup time and do hot deployment hot replacement (such as jsp hot replacement)
, but in fact, when website development does not need jsp, to launch, the process of hotswap is also to deploy the entire project on other machines, and then cut traffic in the load balancer layer without the hotswap feature provided by jvm
. Since that being the case, is it better for jvm to compile class into machine code in advance? Why do you want to do jit?

May.26,2021

to balance compilation time and running efficiency. In fact, after a period of time, JVM compiles the hot code into machine code. For more information, take a look at geek time, "in-depth disassembly of the Java virtual machine," lesson 1, "how does the Java code work?" The writer is an Oracle GraalVM virtual machine developer, Oracle senior researcher and computer doctor.


because jvm is java virtual machine not jsp virtual machine


there are a lot of articles on the Internet. I have found an article for you. You can take a look at it.

https://blog.csdn.net/sunxian.

Menu