What is JIT in Java | Just In Time Compiler

What is JIT in Java | Just In Time Compiler ?

What is JIT in Java | Just In Time Compiler

What is JIT (Just-in-Time) Compilation?

Nate: Before we can get in to what is JIT we need to get some basic compiler fundamentale

There are two basic ways languages are compiled

1.Compiled Languages
2.Interpreted Languages

Machine understands only binary language. So finally source code has to be compiled in binary format. Compiled and interpreter varies from the way they generate the binary files. You can see from the above

figure on the left hand side we have the compiled way of generating the binary and on the right hand side we have the interpreted way. In the compiled way the compiler directly generates the binary file from the source code. While in the interpreted way it generates the class file which is then run by the virtual machine. That means the binary file is generated during runtime.

Now lets try to answer what is JIT?. When JVM compiles the class file he does not compile the full class file in one shot. Compilation is done on function basis or file basis. Advantage gained from this is that heavy parsing of original source code is avoided. Depending on need basis the compilation is done. This type of compilation is termed as JIT or Just-in-Time compilation)

Just In Time Compiler | What is JIT in Java

Post a Comment

Thanks for Comment

Previous Post Next Post