Re:I've been writing ring buffers wrong all these years
by dllthomas on Thursday December 15, 2016 @06:35PM
(#13189746)
With the conditional subtraction recommended elsewhere, you can do 2*N with no branch mispredictions and no modulo. Whether that's actually faster should be tested, if you're in an environment where you care about such things.
[ Parent
| on HN ]
There are no comments on this comment yet.