Some JVMs would compile Java byte code into native machine code. We know that there are lots of optimizations we could apply for that. Recently, I also learn that a branch operation may block the CPU and affect the performance significantly, if a CPU makes a wrong prediction.
Does anyone know if any JVM would generate machine codes easier for CPU making right prediction based on runtime statistics collected?
Best Answer
No, HotSpot does not add hints to the hardware branch predictor as stated on the OpenJDK mailing list: