A memory bound queue and by making use of generics, it has more performance due to having one indirection less per element and being able to store all of them in a continuous memory segment.
Go channels (and slices and maps) are special built-in types that are already "generic", i.e. they have type parameters: "make(chan Foo, 10)".
Is there some property of the built-in buffered channel contract that makes it hard to implement as efficiently as this ring buffer?
Anyway. The ability to implement user-defined data structures with the full power of the language (e.g. building your own 'chan T') allows one to choose some different guarantees and target different use cases
Compile-time generics can often perform similar behavior but with a far better memory layout resulting in better performance.
Purely speculation though about `chan`, i have no clue.
/usr/local/go/src/runtime/chan.go
There are some reflection calls in there, together with mutex lock/unlock and calls to 'typedmemmove' which seems to involve the use of memory barriers (mbarrier.go in the same directory).