3 ms·
It might also be worth comparing to the stdlib's `container/ring` implementation of a non-generic ring buffer, to see how your code might differ between `RingBu
by travisby 5y ago
It might also be worth comparing to the stdlib's `container/ring` implementation of a non-generic ring buffer, to see how your code might differ between `RingBuffer[string]` and how the `interface{}` version of container/ring works!
https://pkg.go.dev/container/ring#example-Ring.Do https://pkg.go.dev/container/ring#example-Ring.Do
The casting back and forth from T and `interface{}` is expensive, boilerplatey/extracode, and panic-prone.