List 的 removeAll 方法的效率

List 的 removeAll 方法的效率低的緣由: 要遍歷source,對dest進行contain操做,而contain又要遍歷dest進行equal比較。css

解決辦法:dest轉爲set,用set的contain方法,而後不包含的add到新的list。add的效率更高。 html

代碼:java

 public static <T> List<T> removeAll(final List<T> source, final List<T> destination) {

List<T> result = new ArrayList<>();
Set<T> destinationSet = new HashSet<T>(destination);

for(T t : source) {
if (!destinationSet.contains(t)) {
result.add(t);
}
}

return result;
}

實測:android

ArrayList.removeAll: source size is 100, final size is 80, use millis is 0git

ListUtil.removeAll: source size is 100, final size is 80, use millis is 2github

 

ArrayList.removeAll: source size is 1000, final size is 800, use millis is 4web

ListUtil.removeAll: source size is 1000, final size is 800, use millis is 1redis

 

ArrayList.removeAll: source size is 10000, final size is 8000, use millis is 120算法

ListUtil.removeAll: source size is 10000, final size is 8000, use millis is 3spring

 

ArrayList.removeAll: source size is 100000, final size is 80000, use millis is 14424

ListUtil.removeAll: source size is 100000, final size is 80000, use millis is 29

 

ListUtil.removeAll: source size is 1000000, final size is 800000, use millis is 121

 

ListUtil.removeAll: source size is 10000000, final size is 8000000, use millis is 2277

 

 

下文轉自:https://blog.csdn.net/kangxingang/article/details/9033491

 原文內容:

Java中,List是最經常使用到的一種集合類。咱們也常常對List進行操做,也沒有碰到什麼問題。可是剛剛在調用removeAll方法是,碰到了嚴重的性能問題。

問題是這樣的:

原集合:List<T> source,有大概200,000數據。

目標集合:List<T> destination,有大概150,000數據。

二者中均可能有重複的元素,二者中可能有相同的元素。已經實現了T中的hashCode(),equals()方法。我調用了source.removeAll(destination),結果花費了15分鐘時間。這真是不可接受的。

下來就是本身瞎折騰,試圖實現一個與removeAll()方法功能同樣的方法,可是性能要有提升。

思路一:有資料代表,給List中add()數據的速度要比從List中remove()數據的快。試着實現了下,可是效果不明顯,與原來的removeAll()差異不大。源代碼以下:

 

[html]  view plain  copy
 
  1. public List<T> removeAll_01(List<T> source, List<T> destination) {  
  2.     List<Tresult = new LinkedList<T>();  
  3.     for(T t : source) {  
  4.         if (!destination.contains(t)) {  
  5.             result.add(t);  
  6.         }  
  7.     }  
  8.     return result;  
  9. }  

 

思路二:運用Set能夠去重這一特性。將source中的元素逐個添加到由destination生成的Set中,若是Set.add(e)爲true,說明e應該保留到結果中,不然放棄e。由於source中可能存在重複的元素,所以想到用Map來保存source中的元素與其在source中出現的次數。結果令我大跌眼鏡,太JB帥了。性能的提升有好幾個數量級。源代碼以下:

 

[html]  view plain  copy
 
  1. public List<T> removeAll_02(List<T> source, List<T> destination) {  
  2.     List<Tresult = new LinkedList<T>();  
  3.   
  4.     Map<T, IntegersourceMap = new HashMap<T, Integer>();  
  5.     for (T t : source) {  
  6.         if (sourceMap.containsKey(t)) {  
  7.             sourceMap.put(t, sourceMap.get(t) + 1);  
  8.         } else {  
  9.             sourceMap.put(t, 1);  
  10.         }  
  11.     }  
  12.   
  13.     Set<Tall = new HashSet<T>(destination);  
  14.     for (Map.Entry<T, Integer> entry : sourceMap.entrySet()) {  
  15.         T key = entry.getKey();  
  16.         Integer value = entry.getValue();  
  17.         if (all.add(key)) {  
  18.             for (int i = 0; i value; i++) {  
  19.                 result.add(key);  
  20.             }  
  21.         }  
  22.     }  
  23.     return result;  
  24. }  

 

 

思路三:比較下思路二和思路一的代碼實現,思路二優於思路一?爲何,爲何?難道Map.containsKey()方法要比List.contains()方法快幾何倍數。因此有了思路三。由於Map.containsKey()實際就是Set.contains(),因此對思路一的代碼作了少量修改。證明了想法,結果比思路二更好。源代碼以下:

 

[html]  view plain  copy
 
  1. public List<T> removeAll_03(List<T> source, List<T> destination) {  
  2.     List<Tresult = new LinkedList<T>();  
  3.     Set<TdestinationSet = new HashSet<T>(destination);  
  4.     for(T t : source) {  
  5.         if (!destinationSet.contains(t)) {  
  6.             result.add(t);  
  7.         }  
  8.     }  
  9.     return result;  
  10. }  

 

那麼,讓我沒看看具體的下效果如何。爲了方便測試,T選用Integer,List中的元素用隨機數Random.nextInt(),隨機數的最大之爲1,000,000。

上述結果代表,隨着數據量的變大,思路二和思路三的表現很是出色。爲何會這樣呢?歸根到底,仍是由於Map.containsKey()和Set.contains()的速度快。

好了,這個問題到此先告一段落。以後,再分析下各思路的算法和時間複雜度。

你們能夠到http://download.csdn.net/detail/kangxingang/5549289下載完整代碼,修改count和maxNumber後,查看執行結果。

"F:\Program Files\Java\jdk1.8.0_91\bin\java" -ea -Djacoco-agent.destfile=target/jacoco.exec -Didea.test.cyclic.buffer.size=1048576 "-javaagent:F:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2017.2\lib\idea_rt.jar=55659:F:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2017.2\bin" -Dfile.encoding=UTF-8 -classpath "F:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2017.2\lib\idea_rt.jar;F:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2017.2\plugins\junit\lib\junit-rt.jar;F:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2017.2\plugins\junit\lib\junit5-rt.jar;F:\Program Files\Java\jdk1.8.0_91\jre\lib\charsets.jar;F:\Program Files\Java\jdk1.8.0_91\jre\lib\deploy.jar;F:\Program Files\Java\jdk1.8.0_91\jre\lib\ext\access-bridge-64.jar;F:\Program Files\Java\jdk1.8.0_91\jre\lib\ext\cldrdata.jar;F:\Program Files\Java\jdk1.8.0_91\jre\lib\ext\dnsns.jar;F:\Program Files\Java\jdk1.8.0_91\jre\lib\ext\jaccess.jar;F:\Program Files\Java\jdk1.8.0_91\jre\lib\ext\jfxrt.jar;F:\Program Files\Java\jdk1.8.0_91\jre\lib\ext\localedata.jar;F:\Program Files\Java\jdk1.8.0_91\jre\lib\ext\nashorn.jar;F:\Program Files\Java\jdk1.8.0_91\jre\lib\ext\sunec.jar;F:\Program Files\Java\jdk1.8.0_91\jre\lib\ext\sunjce_provider.jar;F:\Program Files\Java\jdk1.8.0_91\jre\lib\ext\sunmscapi.jar;F:\Program Files\Java\jdk1.8.0_91\jre\lib\ext\sunpkcs11.jar;F:\Program Files\Java\jdk1.8.0_91\jre\lib\ext\zipfs.jar;F:\Program Files\Java\jdk1.8.0_91\jre\lib\javaws.jar;F:\Program Files\Java\jdk1.8.0_91\jre\lib\jce.jar;F:\Program Files\Java\jdk1.8.0_91\jre\lib\jfr.jar;F:\Program Files\Java\jdk1.8.0_91\jre\lib\jfxswt.jar;F:\Program Files\Java\jdk1.8.0_91\jre\lib\jsse.jar;F:\Program Files\Java\jdk1.8.0_91\jre\lib\management-agent.jar;F:\Program Files\Java\jdk1.8.0_91\jre\lib\plugin.jar;F:\Program Files\Java\jdk1.8.0_91\jre\lib\resources.jar;F:\Program Files\Java\jdk1.8.0_91\jre\lib\rt.jar;F:\git\ai\WALL-E-Server\target\test-classes;F:\git\ai\WALL-E-Server\target\classes;C:\Users\z00199662\.m2\package2\org\springframework\boot\spring-boot-starter-web\1.5.4.RELEASE\spring-boot-starter-web-1.5.4.RELEASE.jar;C:\Users\z00199662\.m2\package2\org\springframework\boot\spring-boot-starter\1.5.4.RELEASE\spring-boot-starter-1.5.4.RELEASE.jar;C:\Users\z00199662\.m2\package2\org\springframework\boot\spring-boot\1.5.4.RELEASE\spring-boot-1.5.4.RELEASE.jar;C:\Users\z00199662\.m2\package2\org\springframework\boot\spring-boot-autoconfigure\1.5.4.RELEASE\spring-boot-autoconfigure-1.5.4.RELEASE.jar;C:\Users\z00199662\.m2\package2\org\springframework\boot\spring-boot-starter-logging\1.5.4.RELEASE\spring-boot-starter-logging-1.5.4.RELEASE.jar;C:\Users\z00199662\.m2\package2\ch\qos\logback\logback-classic\1.1.11\logback-classic-1.1.11.jar;C:\Users\z00199662\.m2\package2\org\slf4j\jul-to-slf4j\1.7.25\jul-to-slf4j-1.7.25.jar;C:\Users\z00199662\.m2\package2\org\slf4j\log4j-over-slf4j\1.7.25\log4j-over-slf4j-1.7.25.jar;C:\Users\z00199662\.m2\package2\org\yaml\snakeyaml\1.17\snakeyaml-1.17.jar;C:\Users\z00199662\.m2\package2\org\springframework\boot\spring-boot-starter-tomcat\1.5.4.RELEASE\spring-boot-starter-tomcat-1.5.4.RELEASE.jar;C:\Users\z00199662\.m2\package2\org\apache\tomcat\embed\tomcat-embed-core\8.5.23\tomcat-embed-core-8.5.23.jar;C:\Users\z00199662\.m2\package2\org\apache\tomcat\tomcat-annotations-api\8.5.23\tomcat-annotations-api-8.5.23.jar;C:\Users\z00199662\.m2\package2\org\apache\tomcat\embed\tomcat-embed-el\8.5.23\tomcat-embed-el-8.5.23.jar;C:\Users\z00199662\.m2\package2\org\apache\tomcat\embed\tomcat-embed-websocket\8.5.23\tomcat-embed-websocket-8.5.23.jar;C:\Users\z00199662\.m2\package2\org\hibernate\hibernate-validator\5.3.5.Final\hibernate-validator-5.3.5.Final.jar;C:\Users\z00199662\.m2\package2\javax\validation\validation-api\1.1.0.Final\validation-api-1.1.0.Final.jar;C:\Users\z00199662\.m2\package2\org\jboss\logging\jboss-logging\3.3.1.Final\jboss-logging-3.3.1.Final.jar;C:\Users\z00199662\.m2\package2\com\fasterxml\jackson\core\jackson-databind\2.8.8\jackson-databind-2.8.8.jar;C:\Users\z00199662\.m2\package2\com\fasterxml\jackson\core\jackson-annotations\2.8.0\jackson-annotations-2.8.0.jar;C:\Users\z00199662\.m2\package2\com\fasterxml\jackson\core\jackson-core\2.8.8\jackson-core-2.8.8.jar;C:\Users\z00199662\.m2\package2\org\springframework\spring-web\4.3.9.RELEASE\spring-web-4.3.9.RELEASE.jar;C:\Users\z00199662\.m2\package2\org\springframework\spring-webmvc\4.3.9.RELEASE\spring-webmvc-4.3.9.RELEASE.jar;C:\Users\z00199662\.m2\package2\org\springframework\boot\spring-boot-starter-data-jpa\1.5.4.RELEASE\spring-boot-starter-data-jpa-1.5.4.RELEASE.jar;C:\Users\z00199662\.m2\package2\org\springframework\boot\spring-boot-starter-jdbc\1.5.4.RELEASE\spring-boot-starter-jdbc-1.5.4.RELEASE.jar;C:\Users\z00199662\.m2\package2\org\apache\tomcat\tomcat-jdbc\8.5.23\tomcat-jdbc-8.5.23.jar;C:\Users\z00199662\.m2\package2\org\apache\tomcat\tomcat-juli\8.5.23\tomcat-juli-8.5.23.jar;C:\Users\z00199662\.m2\package2\org\springframework\spring-jdbc\4.3.9.RELEASE\spring-jdbc-4.3.9.RELEASE.jar;C:\Users\z00199662\.m2\package2\org\hibernate\hibernate-core\5.0.12.Final\hibernate-core-5.0.12.Final.jar;C:\Users\z00199662\.m2\package2\org\hibernate\javax\persistence\hibernate-jpa-2.1-api\1.0.0.Final\hibernate-jpa-2.1-api-1.0.0.Final.jar;C:\Users\z00199662\.m2\package2\org\javassist\javassist\3.21.0-GA\javassist-3.21.0-GA.jar;C:\Users\z00199662\.m2\package2\antlr\antlr\2.7.7\antlr-2.7.7.jar;C:\Users\z00199662\.m2\package2\org\jboss\jandex\2.0.0.Final\jandex-2.0.0.Final.jar;C:\Users\z00199662\.m2\package2\org\hibernate\common\hibernate-commons-annotations\5.0.1.Final\hibernate-commons-annotations-5.0.1.Final.jar;C:\Users\z00199662\.m2\package2\org\hibernate\hibernate-entitymanager\5.0.12.Final\hibernate-entitymanager-5.0.12.Final.jar;C:\Users\z00199662\.m2\package2\javax\transaction\javax.transaction-api\1.2\javax.transaction-api-1.2.jar;C:\Users\z00199662\.m2\package2\org\springframework\data\spring-data-jpa\1.11.4.RELEASE\spring-data-jpa-1.11.4.RELEASE.jar;C:\Users\z00199662\.m2\package2\org\springframework\data\spring-data-commons\1.13.4.RELEASE\spring-data-commons-1.13.4.RELEASE.jar;C:\Users\z00199662\.m2\package2\org\springframework\spring-orm\4.3.9.RELEASE\spring-orm-4.3.9.RELEASE.jar;C:\Users\z00199662\.m2\package2\org\springframework\spring-tx\4.3.9.RELEASE\spring-tx-4.3.9.RELEASE.jar;C:\Users\z00199662\.m2\package2\org\slf4j\jcl-over-slf4j\1.7.25\jcl-over-slf4j-1.7.25.jar;C:\Users\z00199662\.m2\package2\org\springframework\spring-aspects\4.3.9.RELEASE\spring-aspects-4.3.9.RELEASE.jar;C:\Users\z00199662\.m2\package2\org\springframework\boot\spring-boot-starter-data-redis\1.5.4.RELEASE\spring-boot-starter-data-redis-1.5.4.RELEASE.jar;C:\Users\z00199662\.m2\package2\org\springframework\data\spring-data-redis\1.8.4.RELEASE\spring-data-redis-1.8.4.RELEASE.jar;C:\Users\z00199662\.m2\package2\org\springframework\data\spring-data-keyvalue\1.2.4.RELEASE\spring-data-keyvalue-1.2.4.RELEASE.jar;C:\Users\z00199662\.m2\package2\org\springframework\spring-oxm\4.3.9.RELEASE\spring-oxm-4.3.9.RELEASE.jar;C:\Users\z00199662\.m2\package2\org\springframework\spring-context-support\4.3.9.RELEASE\spring-context-support-4.3.9.RELEASE.jar;C:\Users\z00199662\.m2\package2\redis\clients\jedis\2.9.0\jedis-2.9.0.jar;C:\Users\z00199662\.m2\package2\org\apache\commons\commons-pool2\2.4.2\commons-pool2-2.4.2.jar;C:\Users\z00199662\.m2\package2\org\springframework\boot\spring-boot-starter-aop\1.5.4.RELEASE\spring-boot-starter-aop-1.5.4.RELEASE.jar;C:\Users\z00199662\.m2\package2\org\springframework\spring-aop\4.3.9.RELEASE\spring-aop-4.3.9.RELEASE.jar;C:\Users\z00199662\.m2\package2\org\aspectj\aspectjweaver\1.8.10\aspectjweaver-1.8.10.jar;C:\Users\z00199662\.m2\package2\org\springframework\boot\spring-boot-starter-websocket\1.5.4.RELEASE\spring-boot-starter-websocket-1.5.4.RELEASE.jar;C:\Users\z00199662\.m2\package2\org\springframework\spring-messaging\4.3.9.RELEASE\spring-messaging-4.3.9.RELEASE.jar;C:\Users\z00199662\.m2\package2\org\springframework\spring-websocket\4.3.9.RELEASE\spring-websocket-4.3.9.RELEASE.jar;C:\Users\z00199662\.m2\package2\org\projectlombok\lombok\1.16.18\lombok-1.16.18.jar;C:\Users\z00199662\.m2\package2\org\apache\httpcomponents\httpclient\4.5.2\httpclient-4.5.2.jar;C:\Users\z00199662\.m2\package2\org\apache\httpcomponents\httpcore\4.4.6\httpcore-4.4.6.jar;C:\Users\z00199662\.m2\package2\commons-codec\commons-codec\1.10\commons-codec-1.10.jar;C:\Users\z00199662\.m2\package2\org\apache\poi\poi\3.14\poi-3.14.jar;C:\Users\z00199662\.m2\package2\temp2\uportal\3rd\proton\8.3-606.jdbc4\proton-8.3-606.jdbc4.jar;C:\Users\z00199662\.m2\package2\org\springframework\boot\spring-boot-starter-test\1.5.4.RELEASE\spring-boot-starter-test-1.5.4.RELEASE.jar;C:\Users\z00199662\.m2\package2\org\springframework\boot\spring-boot-test\1.5.4.RELEASE\spring-boot-test-1.5.4.RELEASE.jar;C:\Users\z00199662\.m2\package2\org\springframework\boot\spring-boot-test-autoconfigure\1.5.4.RELEASE\spring-boot-test-autoconfigure-1.5.4.RELEASE.jar;C:\Users\z00199662\.m2\package2\com\jayway\jsonpath\json-path\2.2.0\json-path-2.2.0.jar;C:\Users\z00199662\.m2\package2\net\minidev\json-smart\2.2.1\json-smart-2.2.1.jar;C:\Users\z00199662\.m2\package2\net\minidev\accessors-smart\1.1\accessors-smart-1.1.jar;C:\Users\z00199662\.m2\package2\org\ow2\asm\asm\5.0.3\asm-5.0.3.jar;C:\Users\z00199662\.m2\package2\junit\junit\4.12\junit-4.12.jar;C:\Users\z00199662\.m2\package2\org\assertj\assertj-core\2.6.0\assertj-core-2.6.0.jar;C:\Users\z00199662\.m2\package2\org\mockito\mockito-core\1.10.19\mockito-core-1.10.19.jar;C:\Users\z00199662\.m2\package2\org\objenesis\objenesis\2.1\objenesis-2.1.jar;C:\Users\z00199662\.m2\package2\org\hamcrest\hamcrest-core\1.3\hamcrest-core-1.3.jar;C:\Users\z00199662\.m2\package2\org\hamcrest\hamcrest-library\1.3\hamcrest-library-1.3.jar;C:\Users\z00199662\.m2\package2\org\skyscreamer\jsonassert\1.4.0\jsonassert-1.4.0.jar;C:\Users\z00199662\.m2\package2\com\vaadin\external\google\android-json\0.0.20131108.vaadin1\android-json-0.0.20131108.vaadin1.jar;C:\Users\z00199662\.m2\package2\org\springframework\spring-core\4.3.9.RELEASE\spring-core-4.3.9.RELEASE.jar;C:\Users\z00199662\.m2\package2\org\springframework\spring-test\4.3.9.RELEASE\spring-test-4.3.9.RELEASE.jar;C:\Users\z00199662\.m2\package2\com\alibaba\fastjson\1.2.37\fastjson-1.2.37.jar;C:\Users\z00199662\.m2\package2\org\jacoco\org.jacoco.agent\0.7.9\org.jacoco.agent-0.7.9-runtime.jar;C:\Users\z00199662\.m2\package2\io\springfox\springfox-swagger2\2.6.1\springfox-swagger2-2.6.1.jar;C:\Users\z00199662\.m2\package2\io\swagger\swagger-annotations\1.5.10\swagger-annotations-1.5.10.jar;C:\Users\z00199662\.m2\package2\io\swagger\swagger-models\1.5.10\swagger-models-1.5.10.jar;C:\Users\z00199662\.m2\package2\io\springfox\springfox-spi\2.6.1\springfox-spi-2.6.1.jar;C:\Users\z00199662\.m2\package2\io\springfox\springfox-core\2.6.1\springfox-core-2.6.1.jar;C:\Users\z00199662\.m2\package2\io\springfox\springfox-schema\2.6.1\springfox-schema-2.6.1.jar;C:\Users\z00199662\.m2\package2\io\springfox\springfox-swagger-common\2.6.1\springfox-swagger-common-2.6.1.jar;C:\Users\z00199662\.m2\package2\io\springfox\springfox-spring-web\2.6.1\springfox-spring-web-2.6.1.jar;C:\Users\z00199662\.m2\package2\com\google\guava\guava\18.0\guava-18.0.jar;C:\Users\z00199662\.m2\package2\com\fasterxml\classmate\1.3.3\classmate-1.3.3.jar;C:\Users\z00199662\.m2\package2\org\slf4j\slf4j-api\1.7.25\slf4j-api-1.7.25.jar;C:\Users\z00199662\.m2\package2\org\springframework\plugin\spring-plugin-core\1.2.0.RELEASE\spring-plugin-core-1.2.0.RELEASE.jar;C:\Users\z00199662\.m2\package2\org\springframework\plugin\spring-plugin-metadata\1.2.0.RELEASE\spring-plugin-metadata-1.2.0.RELEASE.jar;C:\Users\z00199662\.m2\package2\org\mapstruct\mapstruct\1.0.0.Final\mapstruct-1.0.0.Final.jar;C:\Users\z00199662\.m2\package2\io\springfox\springfox-swagger-ui\2.6.1\springfox-swagger-ui-2.6.1.jar;C:\Users\z00199662\.m2\package2\com\huawei\wsf\huawei-secure-core\2.1.4\huawei-secure-core-2.1.4.jar;C:\Users\z00199662\.m2\package2\org\springframework\security\spring-security-core\4.2.3.RELEASE\spring-security-core-4.2.3.RELEASE.jar;C:\Users\z00199662\.m2\package2\aopalliance\aopalliance\1.0\aopalliance-1.0.jar;C:\Users\z00199662\.m2\package2\org\springframework\security\spring-security-web\4.2.3.RELEASE\spring-security-web-4.2.3.RELEASE.jar;C:\Users\z00199662\.m2\package2\org\springframework\spring-beans\4.3.9.RELEASE\spring-beans-4.3.9.RELEASE.jar;C:\Users\z00199662\.m2\package2\org\springframework\spring-context\4.3.9.RELEASE\spring-context-4.3.9.RELEASE.jar;C:\Users\z00199662\.m2\package2\org\springframework\spring-expression\4.3.9.RELEASE\spring-expression-4.3.9.RELEASE.jar;C:\Users\z00199662\.m2\package2\com\huawei\wsf\huawei-secure-validator\2.1.4\huawei-secure-validator-2.1.4.jar;C:\Users\z00199662\.m2\package2\com\huawei\wsf\huawei-secure-checkengine\2.0.4\huawei-secure-checkengine-2.0.4.jar;C:\Users\z00199662\.m2\package2\dom4j\dom4j\1.6.1\dom4j-1.6.1.jar;C:\Users\z00199662\.m2\package2\jaxen\jaxen\1.1.6\jaxen-1.1.6.jar;C:\Users\z00199662\.m2\package2\com\huawei\wsf\huawei-secure-api\2.1.4\huawei-secure-api-2.1.4.jar;C:\Users\z00199662\.m2\package2\log4j\log4j\1.2.16\log4j-1.2.16.jar;C:\Users\z00199662\.m2\package2\org\owasp\antisamy\antisamy\1.5.7\antisamy-1.5.7.jar;C:\Users\z00199662\.m2\package2\commons-lang\commons-lang\2.6\commons-lang-2.6.jar;C:\Users\z00199662\.m2\package2\com\huawei\pdm\org\apache\xmlgraphics\batik-css\1.9\batik-css-1.9.jar;C:\Users\z00199662\.m2\package2\net\sourceforge\nekohtml\nekohtml\1.9.22\nekohtml-1.9.22.jar;C:\Users\z00199662\.m2\package2\apache-xerces\xercesImpl\2.9.1\xercesImpl-2.9.1.jar;C:\Users\z00199662\.m2\package2\net\logstash\logback\logstash-logback-encoder\4.9\logstash-logback-encoder-4.9.jar;C:\Users\z00199662\.m2\package2\ch\qos\logback\logback-core\1.1.11\logback-core-1.1.11.jar;C:\Users\z00199662\.m2\package2\commons-configuration\commons-configuration\1.8\commons-configuration-1.8.jar;C:\Users\z00199662\.m2\package2\commons-logging\commons-logging\1.1.1\commons-logging-1.1.1.jar;C:\Users\z00199662\.m2\package2\com\squareup\okhttp3\okhttp\3.5.0\okhttp-3.5.0.jar;C:\Users\z00199662\.m2\package2\com\squareup\okio\okio\1.11.0\okio-1.11.0.jar;C:\Users\z00199662\.m2\package2\com\huawei\aigateway\base-agent\0.0.1-SNAPSHOT\base-agent-0.0.1-20180419.172826-462.jar;C:\Users\z00199662\.m2\package2\temp2\uportal\3rd\httpcore\4.4.5\httpcore-4.4.5.jar;C:\Users\z00199662\.m2\package2\temp2\uportal\3rd\mina-core\2.0.16\mina-core-2.0.16.jar;C:\Users\z00199662\.m2\package2\temp2\uportal\3rd\dom4j\1.6.1\dom4j-1.6.1.jar;C:\Users\z00199662\.m2\package2\temp2\uportal\3rd\jackson-all\1.9.11\jackson-all-1.9.11.jar;C:\Users\z00199662\.m2\package2\temp2\uportal\3rd\slf4j-api\1.7.21\slf4j-api-1.7.21.jar;C:\Users\z00199662\.m2\package2\com\huawei\aigateway\base-mml\0.0.1-SNAPSHOT\base-mml-0.0.1-20180419.172831-461.jar;C:\Users\z00199662\.m2\package2\com\huawei\aigateway\common\0.0.1-SNAPSHOT\common-0.0.1-20180419.172819-465.jar;C:\Users\z00199662\.m2\package2\temp2\uportal\3rd\commons-lang3\3.2\commons-lang3-3.2.jar;C:\Users\z00199662\.m2\package2\com\huawei\aigateway\utils\0.0.1-SNAPSHOT\utils-0.0.1-20180419.172816-466.jar;C:\Users\z00199662\.m2\package2\temp2\uportal\3rd\xpp3\1.1.4\xpp3-1.1.4-c.jar;C:\Users\z00199662\.m2\package2\temp2\uportal\3rd\commons-io\2.4\commons-io-2.4.jar;C:\Users\z00199662\.m2\package2\temp2\uportal\3rd\axis2-adb\1.6.3\axis2-adb-1.6.3.jar;C:\Users\z00199662\.m2\package2\temp2\uportal\3rd\validation-api\1.1.0.Final\validation-api-1.1.0.Final.jar;C:\Users\z00199662\.m2\package2\temp2\uportal\3rd\jersey-server\2.23.1\jersey-server-2.23.1.jar;C:\Users\z00199662\.m2\package2\temp2\uportal\3rd\com.springsource.org.apache.commons.lang\2.6.0\com.springsource.org.apache.commons.lang-2.6.0.jar;C:\Users\z00199662\.m2\package2\com\huawei\aigateway\base-snmp\0.0.1-SNAPSHOT\base-snmp-0.0.1-20180419.172834-204.jar;C:\Users\z00199662\.m2\package2\temp2\uportal\3rd\snmp4j\2.2.2\snmp4j-2.2.2.jar;C:\Users\z00199662\.m2\package2\com\github\penggle\kaptcha\2.3.2\kaptcha-2.3.2.jar;C:\Users\z00199662\.m2\package2\javax\servlet\javax.servlet-api\3.1.0\javax.servlet-api-3.1.0.jar;C:\Users\z00199662\.m2\package2\com\jhlabs\filters\2.0.235-1\filters-2.0.235-1.jar" com.intellij.rt.execution.junit.JUnitStarter -ideVersion5 -junit4 com.huawei.ai.common.util.ListUtilTest,listRemoveAllArrayList.removeAll: source size is 100, final size is 80, use millis is 0ListUtil.removeAll: source size is 100, final size is 80, use millis is 2ArrayList.removeAll: source size is 1000, final size is 800, use millis is 4ListUtil.removeAll: source size is 1000, final size is 800, use millis is 1ArrayList.removeAll: source size is 10000, final size is 8000, use millis is 120ListUtil.removeAll: source size is 10000, final size is 8000, use millis is 3ArrayList.removeAll: source size is 100000, final size is 80000, use millis is 14424ListUtil.removeAll: source size is 100000, final size is 80000, use millis is 29ListUtil.removeAll: source size is 1000000, final size is 800000, use millis is 121ListUtil.removeAll: source size is 10000000, final size is 8000000, use millis is 2277

相關文章
相關標籤/搜索