News for hackers. Stuff that matters.
Re:Yes, You Have Been Writing SPSC Queues Wrong by buzzybee on Thursday December 15, 2016 @02:55PM (#13187674)
Some of these implementations also reduce the number of branches, which is generally a good performance idea in modern pipelined, branch-predicting CPUs, but not possible in all cases or even a guaranteed win for performance.

FWIW I checked what I did with the last ring buffer I wrote: I used position + length to eke out that last cell. As the original article notes, it's not a concurrency-friendly solution, but I wasn't writing for that in this case.

There are no comments on this comment yet.