// Collection of code snippets by Arne Vajhøj 
// (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) 
public class SpeedTest {
    private static final int N = 100000000;
    public static void main(String[] args) {
        I o1 = new C1();
        long t1 = System.currentTimeMillis();
        for(int i = 0; i < N; i++) {
            o1.m();
        }
        long t2 = System.currentTimeMillis();
        System.out.println("I: " + (t2 - t1));
        AC o2 = new C2();
        long t3 = System.currentTimeMillis();
        for(int i = 0; i < N; i++) {
            o2.m();
        }
        long t4 = System.currentTimeMillis();
        System.out.println("AC: " + (t4 - t3));
    }
}

interface I {
    public void m();
}

abstract class AC {
    abstract public void m();
}

class C1 implements I {
    public void m() {
    }
}

class C2 extends AC {
    public void m() {
    }
}
