Open TheButlah opened 3 years ago
See also https://github.com/mgeier/rtrb/issues/39.
Hi, thank you for being interested in this crate!
Honestly speaking, the performance wasn't the main goal of the crate and I haven't focused on it heavily. I created that crate just to have at least some implementation of ring buffer being light-weight and with direct access to underlying memory. And I'm glad to see that now there is a variety of a ring buffer implementations to choose from.
About your question - @mgeier made a nice comparison and according to it rtrb seems to be a better option.
It's interesting to find out where 3x performance difference come from. Maybe in near future I will find some time to investigate this and to apply some optimizations.
It's interesting to find out where 3x performance difference come from.
I guess a part of it comes from false sharing of the head
and tail
indices as suggested in #7.
https://github.com/agerasev/ringbuf/issues/7#issuecomment-666339687 mentions another potential optimization by trying to read the atomic indices less often.
A basic performance comparison would be great to compare against other rust ringbuffers, as well as crossbeam channel.