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 a LinkedList right? Is there a way to have a queue that will be faster especially for add (I only need poll, add and check for empty).
Down the line I may also need a PriorityQueue but not yet.
I am looking for a fast queue implementation in Java. I see that LinkedList
Share
Eyeballing the source code, LinkedList is O(1) for Queue.add, Queue.poll, and Queue.peek operations.
I hope that’s fast enough.