For readers who are interested: https://dzone.com/articles/ring-buffer-a-data-structure-behi...
Reply on news.ycombinator.com