LinkedList 和 ArrayDeque的性能分析( 六 )


Consider using ArrayDeque for queue-based algorithmsUse ListIterator with LinkedListAvoid any LinkedList methods which accept or return index of an element in the list - they have nothing in common with performanceCheck if you have a reason to use LinkedList.remove/removeFirst/removeLast methods, usepollFirst/pollLast insteadTry batch processing LinkedListThis entry was posted in CPU optimization, Intermediate and tagged collections, cpu optimization,iterators on November 7, 2012.


推荐阅读