News for hackers. Stuff that matters.
Re:Optimizing a Ring Buffer for Throughput by mananaysiempre on Tuesday June 27, 2023 @05:41AM (#36490804)
I don’t get it. Both readIdx_ and writeIdxCached_ are “owned” by the consumer. (That being the point of a “cached” copy.) The producer might read readIdx_ occasionally, whenever we go through the whole buffer, but otherwise only the consumers access these. So why should we avoid putting them on the same cache line?

There are no comments on this comment yet.