What is V8?
V8 is Google's open-source JavaScript Engine.
V8 is written in C ++ and can be used in Google's open-source browser.
V8 uses ecmascript based on instructions in the third edition of ECMA-262 and runs in Windows XP and Vista, Mac OS X 10.5 (Leopard), and Linux systems that use IA-32 or arm processors.
V8 can run independently or be embedded in any c ++ application.
Java JIT Technology
JITCompilation process
WhenJITWhen compilation is enabled (enabled by default), the JVM reads the. Class File explanation and sends itJITCompiler.JITThe compiler will compile the machine code at the cost of bytecode to demonstrate this process.
What isJIT?
JITJust in time, real-time compilation technology. This technology can accelerateJavaProgram execution speed. Next, we will give a brief explanation of this technology.
First, we all know that javac usually compiles and converts the program source codeJavaThe JVM translates the bytecode into corresponding machine commands by interpreting the bytecode, reading them one by one, and interpreting the translation one by one. Obviously, after explanation, the execution speed will inevitably be slower than that of the executable binary bytecode program. To improve the execution speedJITTechnology.
At runtimeJITThe translated machine code is saved and used for the next time. Therefore, theoretically, thisJITThe technology is good. It can be close to the previous pure compilation technology. Let me see,JIT.
WhenJITWhen compilation is enabled (enabled by default), the JVM reads the. Class File explanation and sends itJITCompiler.JITThe compiler compiles bytecode into machine code.
Through the above explanation, we understandJITAlso found a problem dueJITEach byte code is compiled, causing excessive burden on the compilation process. To avoid this situation, the currentJITCompile only frequently executed bytecode, such as loops.
It must be noted that,JITNot always effective, not expectedJITIt will certainly speed up your code execution. What's worse, it may reduce the speed of code execution. It depends on your code structure. Of course, in many cases, we can still get what we want.