зеркало из https://github.com/mozilla/pluotsorbet.git
Fix indentation in BasicGCBench
This commit is contained in:
Родитель
2c9525e719
Коммит
85370014a9
|
@ -4,20 +4,20 @@ import java.util.Vector;
|
|||
import com.sun.cldchi.jvm.JVM;
|
||||
|
||||
public class BasicGCBench {
|
||||
public static void main(String args[]) {
|
||||
public static void main(String args[]) {
|
||||
long start = JVM.monotonicTimeMillis();
|
||||
for (int i = 0; i < 100000; i++) {
|
||||
long[] array = new long[1000];
|
||||
}
|
||||
for (int i = 0; i < 100000; i++) {
|
||||
long[] array = new long[1000];
|
||||
}
|
||||
long time = JVM.monotonicTimeMillis() - start;
|
||||
System.out.println("allocate 1000 long arrays: " + time);
|
||||
|
||||
|
||||
start = JVM.monotonicTimeMillis();
|
||||
for (int i = 0; i < 100000; i++) {
|
||||
Vector v = new Vector(100);
|
||||
}
|
||||
for (int i = 0; i < 100000; i++) {
|
||||
Vector v = new Vector(100);
|
||||
}
|
||||
time = JVM.monotonicTimeMillis() - start;
|
||||
System.out.println("allocate 1000 Vector objects: " + time);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче