News for hackers. Stuff that matters.
Re:Shift-to-Middle Array: A Faster Alternative to Std:Deque? by gpderetta on Tuesday March 25, 2025 @06:36AM (#43469721)
This is normally called a magic ring buffer, and it is a relatively well known pattern. Very useful for queues when you need to support variable size elements and need to interoperate with code that can't handle split objects.

There are no comments on this comment yet.