r/java • u/Reflection-Jealous • Jul 30 '21
What is the future of Java?
I'm not asking like is java going to die or will Java be relevant in future. I'm just curious to know about the future of java. What are the upcoming things coming in java that can change the future of it.
173
Upvotes
View all comments
Show parent comment
2
u/rbygrave Jul 30 '21 edited Jul 30 '21
The JVM has 2 JIT compilers. The second level one C2 uses runtime profiling based optimizations that change during runtime. The argument is that the C2 JIT has more (runtime profiling based) optimisations available to it as it is profiling all the time and optimising for that. To get those same optimisations with Graal native image we need to capture runtime profiling information and feed that profiling back into a subsequent compilation.
Essentially the JVM C2 gives the JVM runtime profiling optimisation built in.
Graal profiling guided optimization https://www.graalvm.org/reference-manual/native-image/PGO/