readerwriterqueue icon indicating copy to clipboard operation
readerwriterqueue copied to clipboard

Folly's LockFreeRingBuffer

Open sevagh opened this issue 10 months ago • 2 comments

Hello,

I notice your benchmark has a copied version of the folly SPSC Queue to include with the benchmark code. I'm interested in your library's circular buffer, and I found folly has a LockFreeRingBuffer in the experimental code: https://github.com/facebook/folly/blob/main/folly/experimental/LockFreeRingBuffer.h

I tried to include it in your existing benchmark, but ended up needing to copy a bunch of header files from Folly (that include even more Header files) e.g.:

benchmarks/ext/folly/LockFreeRingBuffer.h
benchmarks/ext/folly/Portability.h
benchmarks/ext/folly/Traits.h
benchmarks/ext/folly/detail/
benchmarks/ext/folly/portability/
benchmarks/ext/folly/synchronization/

I feel like if I spend more time doing this it may be pointless so I paused for now.

What are your thoughts on the LockFreeRingBuffer? Is it suitable to include in these benchmarks? When the ProducerConsumerQueue was added, was it adapted to remove its dependencies on the rest of folly?

Thanks!

sevagh avatar Apr 07 '24 22:04 sevagh

Probably worth comparing against. I was not aware it existed :-) It looks like I only stripped out one dependency (Boost) for ProducerConsumerQueue. For other benchmarks I've done elsewhere, I have ended up including most of the third-party library for the support headers to work, though obviously I try to avoid that where possible.

cameron314 avatar Apr 07 '24 22:04 cameron314

I'll work harder then and hope to have something to report back as a PR.

sevagh avatar Apr 07 '24 22:04 sevagh