scalalang2 / golang-fifo

Modern efficient cache design with simple FIFO queue only in Golang
MIT License
142 stars 7 forks source link

refactor: replace ringbuf with simple container/list package. #15

Closed scalalang2 closed 11 months ago

scalalang2 commented 11 months ago

Motivation

Replace the ringbuf with linked list queue in container/list package. At first, I implemented a ring buffer directly in order to use a slightly optimized data structure.

However, there was no reason to believe that it would be faster than the linked list supported by the container/list package, so I replaced it.