Java loop gets slower after some runs / JIT's fault?
So I wanted to benchmark some basic java functionality to add some imformation to this question: What is the gain from declaring a method as static . I know writing benchmarks is sometimes not easy but what happens here I cannot explain. Please note that I'm not interessted in how to fix this but on why this happens* The Test class: public class TestPerformanceOfStaticVsDynamicCalls { private static final long RUNS = 1_000_000_000L; public static void main( String [] args ){ new TestPerformanceOfStaticVsDynamicCalls().run(); } private void run(){ long r=0; long start, end; for( int loop = 0;