A fast queue in Java

前端 未结 5 1809
余生分开走
余生分开走 2021-02-04 00:59

I am looking for a fast queue implementation in Java. I see that LinkedList implements the Queue interface, but it will only be as fast as

5条回答
  •  栀梦
    栀梦 (楼主)
    2021-02-04 01:34

    You may want to have a look at http://java.dzone.com/articles/gaplist-%E2%80%93-lightning-fast-list which introduces GapList. This new list implementation combines the strengths of both ArrayList and LinkedList.

    It therefore implements the Deque interface, but can also be presized like the above mentioned ArrayDeque. In addition, you also get all the possibilities of the List interface for free.

提交回复
热议问题