432433434435436437438439440441442
startTime(); for (int i = 0; i < 10000; i++) { StackContext.enter(); Complex x = Complex.valueOf(1.0, 2.0); for (int j = 0; j < results.length; j++) { results[j] = x.times(x); } StackContext.exit(); } endTime(10000 * results.length);
456457458459460461462463464465466
startTime(); for (int i = 0; i < 10000; i++) { StackContext.enter(); Amount<Mass> x = Amount.valueOf(1.0, SI.KILOGRAM); for (int j = 0; j < results.length; j++) { results[j] = x.times(x); } StackContext.exit(); } endTime(10000 * results.length);