On 07/08/2011 02:21 PM, James Morris wrote:
JACK's ringbuf, as most will have undoubtedly
known all along, is
faster, and the test code required 50000 iterations less than when
using my ring buf. maybe somewhere, the atomics are required?
james.
I cannot comment on atomics op, but we have done rather exhaustive testing of
existing ringbuffer implementations on this list in the past.
The small test suite doesn't include any benchmarks, but it does perform
integrity checks which, at the time, allowed to fix a bug in the JACK ringbuffer.
The code tests and includes 4 implementations: JACK ringbuffer, PortAudio
ringbuffer, FFMpeg FIFO, and Fons' LFQ. You can check it out and run it with:
$ svn co
http://svn.samalyse.com/misc/rbtest
$ cd rbtest
$ make test
There is no dependency. Maybe that you could use these tests (especially
test-int-array) to check data integrity with your implementation.
Hope that helps
--
Olivier