Lots of us faced with some performance challenge, encountered the problem with the right measuring time of some method invocation, loop iterations, etc. The first solution that comes into mind is to use System.nanoTime() before and after execution, and after subtraction we will get our result. But are we sure that the simplest answer is also the best one? What about comparing multiple measurements? What about JIT impact?