As the title says:
I remember that in some C compilers (such as GCC), we’re able to give hint to compiler about likely branch prediction results. Does JVM have such function?
Thank you!
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Unless there’s some new annotation that’s escaped me, no.
On the other hand, it’s not clear how terribly useful such a feature would be. Remember that, unlike a language such as C/C++, “prediction” at the level of the source code isn’t necessarily the best strategy because What The Code Is Actually Doing In Practice as it is running isn’t a mystery: the JVM can potentially monitor critical behaviour and if necessary re-compile sections of code in accordance with its measurements.