Random _rand = new Random();List<Long> _list = new ArrayList<Long>();// = new LinkedList<Long>();int _numSuccessfullFills = 0;int _numFills = Integer.MAX_VALUE;...while (_numSuccessfullFills < _numFills) { try { _list.add(_rand.nextLong()); _numSuccessfullFills++; } catch (OutOfMemoryError e) { System.out.print("test ended with " +
Integer.toString(_numSuccessfullFills) +
" successfull fills!"); break; } }
int _numFills = #N#; N Durchschnitt Standardabweichung Maximum Minimum15.000.000 1155,05 ms 121,79 ms 1474 ms 1061 ms10.000.000 308,25 ms 38,63 ms 467 ms 283 ms7.500.000 225,20 ms 28,97 ms 345 ms 209 ms5.000.000 151,45 ms 26,61 ms 265 ms 141 ms2.500.000 76,35 ms 13,50 ms 123 ms 69 ms1.000.000 31,60 ms 8,15 ms 58 ms 27 ms

N Durchschnitt Standardabweichung Maximum Minimum15.000.000 1740,40 ms 136,31 ms 2241 ms 1593 ms10.000.000 329,50 ms 75,10 ms 648 ms 293 ms7.500.000 249,05 ms 34,37 ms 385 ms 222 ms5.000.000 159,10 ms 26,01 ms 261 ms 145 ms2.500.000 81,55 ms 18,90 ms 160 ms 72 ms1.000.000 33,70 ms 8,68 ms 65 ms 29 ms

int _numFills = #N#; int _numFills; int _middleIndex;..._numFills = #N#; _middleIndex = _numFills >> 1;...long i = 0; while (i < _numFills) { try { _list.add( i ); } catch (OutOfMemoryError e) { e.printStackTrace(); break; } i++; }
N Durchschnitt Standardabweichung Maximum Minimum30.000.000 26.03 ms 4,78 ms 42 ms 23 ms25.000.000 21,30 ms 2,76 ms 32 ms 19 ms22.500.000 19,65 ms 3,26 ms 31 ms 17 ms20.000.000 17,05 ms 3,01 ms 29 ms 15 ms17.500.000 16,80 ms 4,61 ms 31 ms 13 ms15.000.000 12,90 ms 3,28 ms 27 ms 11 ms

N Durchschnitt Standardabweichung Maximum Minimum30.000.000 111,10 ms 19,82 ms 180 ms 95 ms25.000.000 91,80 ms 12,40 ms 119 ms 79 ms22.500.000 80,10 ms 7,93 ms 104 ms 71 ms20.000.000 67,20 ms 6,19 ms 83 ms 63 ms17.500.000 58,35 ms 5,68 ms 81 ms 55 ms15.000.000 50,35 ms 3,71 ms 62 ms 47 ms

int i = 0;
int l = _list.size();
while ( i < l ) {
_list.remove( 0 );
i++;
}int i = 0;
int l = _list.size();
while ( i < l ) {
_list.remove( _list.size() - 1 );
i++;
}