Faruk BOZAN
emlakjet
Published in
2 min readMay 29, 2022

--

AOT (Ahead-of-Time) Compiler

In previous post, we had some details JIT compilers. You can read the post from here. Now we will have a look about AOT (ahead-of-time) compiler.

In basically we can say that AOT is opposite of JIT. That means an AOT compiler compiles codes before run. So we reduce running up and warm up times.

Now we have a question that “What is warm up”. Let me answer over JVM. As we know Java/JVM uses byte codes. These byte codes are interpreted and converted to OS specific block by JIT. But JIT doesn’t convert to native blocks immediately. Some conditions and thresholds must be meet. When we run same operations of application over by over execution or response time will decrease. We can say that warm up time is time of collecting some data, converting blocks, making memory improvements and etc by JVM.

AOT compilation is a JEP (java Enhancement Proposal) numbered with 295. You can have detail from JEP-295. Now there is an another question. “Is there a AOT compiler in JVM world?” GraalVM is the answer of this question.

There is a good new also. Spring teams are working on a beta version of native module. It can run with GraalVM. I think it will be a new era for JVM/Java when completed. You can read details of spring native from here.

Spring native, GraalVM and AOT compiler will bring a mind confusion that Java is slow. Of course Java is not slow but some applications need more performance than other types. This is a solution to this need.

We will cover more technical details and examples in advance posts. This post is the first step of AOT compiler and GraalVM. Keep in follow please.

--

--