вторник, 16 августа 2011 г.

Linux - Java collections. Part 2

Java Collections Framework (JCF) Sun JDK 1.6.0_26-b03
Map<Integer, Integer> t = new HashMap <Integer, Integer> ();

Colt 1.2.0
OpenIntIntHashMap t = new OpenIntIntHashMap ();
Trove 3.0.0rc2
TIntIntHashMap t = new TIntIntHashMap ();
Javolution 5.5.1
LocalMap<Integer, Integer> t = new LocalMap<Integer, Integer>();
 
PCJ 1.2
PcjOpen
IntKeyIntOpenHashMap t = new IntKeyIntOpenHashMap ();
 
PcjChained
IntKeyIntChainedHashMap t = new IntKeyIntChainedHashMap ();

Fastutil 6.3
Int2IntOpenHashMap t = new Int2IntOpenHashMap ();

Apache Commons Primitives 1.0
IntList t = new ListIntList (new Vector<Integer> ());

Guava r09 (Google collections)
HashMultimap<Integer, Integer> t = HashMultimap.create();



for (0 -> 5)
 test (0 -> 1 000 000)




JCF Colt Trove Javolution PcjOpen PcjChained Fastutil ACP Guava
Fill. Memory (bytes) 68,133,064 63,119,136 57,653,184 74,772,216 33,933,528 39,020,016 37,999,296 26,553,808 226,627,248

6,411,112 58,223,272 14,828,016 11,995,648 33,712,256 38,989,184 37,758,872 26,676,816 226,302,584

77,204,400 58,095,344 57,642,776 74,997,784 33,779,120 39,169,968 37,758,240 26,490,848 5,289,464

72,908,792 58,040,176 57,651,312 75,625,976 33,683,784 39,063,032 37,756,144 26,589,328 5,090,992

64,801,408 58,011,088 59,269,992 77,353,624 33,678,696 39,094,520 37,763,552 26,741,248 -3,922,144
Fill. Time (ms) 376 138 132 420 96 80 152 39 2290

447 101 390 648 61 50 113 21 1852

365 108 79 337 65 58 117 32 2006

261 103 86 320 70 54 123 34 1949

285 105 66 308 66 47 125 24 2146
Read. Memory (bytes) 151,968 0 0 2,345,264 0 0 0 0 21,900,936

16,184,736 0 0 16,123,520 0 0 0 0 16,060,616

-10,861,736 0 0 16,123,520 0 0 0 0 14,859,024

15,874,584 0 0 -26,366,816 0 0 0 0 -36,395,848

-10,601,616 0 0 15,638,976 0 0 0 0 16,622,760
Read. Time (ms) 166 23 15 184 20 12 46 20 106

25 10 7 168 6 5 38 7 80

147 9 7 97 6 5 36 7 82

21 9 7 239 5 5 36 7 151

154 9 7 95 6 5 35 8 86

Комментариев нет:

Отправить комментарий