When comparing two different algorithm implementations (thus, not caring for their absolute, but only relative performance) am I better off forcing Java to only run interpreted code?
That is, would I be better off with the -Xint flag on?
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.
I don’t think you’d be better disabling JIT.
Either you decide to measure the abstract, asymptotical performance (and in this case you definitely want the big-O notation), or you decide to measure the performance of a given implementation on a given machine for given input data.
If you decide to go for the latter, then it would be pointless to disable JIT: what you want is to measure performance in a realistic environment, and in a realistic environment you’d generally have JIT compilation.