废话不多说,原因不解释,上测试代码:
package com.letv.cloud.cdn.jtest;
import java.io.IOException;
import java.util.ArrayList;
import java.util.LinkedList;
import java.util.List;
import java.util.concurrent.TimeUnit;
import org.slf4j.LoggerFactory;
import com.google.common.base.Stopwatch;
public class JtestMain {
private final static org.slf4j.Logger LOGGER = LoggerFactory.getLogger("JtestMain");
private static Stopwatch stopWatch = new Stopwatch();
public static void testList(int num){
List<String> aList = new ArrayList<String>();
List<String> lList = new LinkedList<String>();
stopWatch.reset();
stopWatch.start();
for(int i=0; i<num; i++){
aList.add("201411180827 cctv5_800 83 796.03 115.182.51.134 123.125.89.75 in uuid1 5");
}
LOGGER.info("insert num:{} ArrayList cost:{} ms",num,stopWatch.elapsedTime(TimeUnit.MILLISECONDS));
stopWatch.re