排序80000个随机数,用时 1579毫秒
//速度测试
int arr[] = new int[80000];
for (int i = 0; i < 80000; i++) {
arr[i] = (int) (Math.random() * 8000000);//生成一个[0,8000000) 的随机数
}
Date date1 = new Date();
long time1 = date1.getTime();
//排序
selectSort(arr);
Date date2 = new Date();
long time2 = date2.getTime();
System.out.println("用时:" + (time2 - time1));//1579