After I saw http://dev.9cbs.net/develop/article/41/41137.shtm, I added some code and then retest it. As a result, I found that it is not slow to slow, but only fluctuations in a small range.
Import java.util.Arraylist; import java.util.list;
/ ** * @AuThor Yoti * in JDK 1.5 * /
PUBLIC CLASS PerformanceTest {
/ ** Creates a new instance of performancetest * /
Public PerformanceTest () {}
Public static void main (string [] args) {long [] beforeadd = new long [2]; long [] afters = new long [2]; longage [] beforeget = new long [2]; longget = new Long [2]; double [] sumadd = new double [2]; double [] SUMGET = New Double [2]; int ANDEORTWO = 0;
System.out.println ("java.version =" system.getproperty)); for (int K = 0; k <100; k ) {IF ((k% 2) == 0) {List = new arraylist (); beforeadd [0] = system.currenttimemillis (); int end = 100000; for (int I = 0; i