Optimizing a ring buffer for throughput

In this article I will take a look at the classic concurrent ring buffer and how it can be optimized to increase throughput.