i'm having a little trouble understanding how the CircularFifoQueue Class works. So for my requirements, i need a FIFO Queue of fixed Size (about 6000 Elements). At frist i was using the ArrayDequeue, but it was performing rather badly. Then i read about CircularFifoQueue and tried it out. I can see a boost in Performance, but it still isn't fast.
My Question is now: what happens if the Queue is full and i add an element? Is the whole underlying array copied? Is there some offset, that will be set, e.g.
head = (head + 1) % size;
If the latter is the case, then i guess my algorithm is performing poorly.
Thanks!