staticint testBasis(int iterations) {
(new SubClass()).testDirect(iterations); return iterations;
}
staticint testStatic(int iterations) {
(new SubClass()).testStatic(iterations); return iterations;
}
staticpublicvoid run(boolean timing) { long time0 = System.nanoTime(); int count1 = testBasis(50000000); long time1 = System.nanoTime(); int count2 = testStatic(50000000); long time2 = System.nanoTime();
System.out.println("basis: performed " + count1 + " iterations");
System.out.println("test1: performed " + count2 + " iterations");
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.