A fast queue in Java

前端 未结 5 1725
余生分开走
余生分开走 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:15

    I see that LinkedList implements the Queue interface, but it will only be as fast as a LinkedList right?

    Eyeballing the source code, LinkedList is O(1) for Queue.add, Queue.poll, and Queue.peek operations.

    I hope that's fast enough.

提交回复
热议问题