Subject: Re: [linux-audio-dev] MidiShare Linux
From: Paul Barton-Davis (pbd_AT_Op.Net)
Date: Fri Jul 21 2000 - 05:12:14 EEST
>> Note that I have a more efficient implementation of a lock-free FIFO
>> for use where the characteristics of a ringbuffer are not desired
>> (i.e. you really are always just pushing and popping elements from the
>> FIFO). The ringbuffer implementation allows it to be used to store
>> streaming data efficiently, but is not so quick for simple push/pop
>> operations.
>
>who says that ? :-)
>
>writing only one element at time in the ringbuffer using:
>ptr=buffer->get_write_ptr();
>*ptr=data;
>buffer->increment_write_ptr(1);
right, this is because you used a template version of the RingBuffer
class. i had such a beast at some point, and then got rid of it. its
clear that this is a win for such situations. without the template
version, the code looks (and probably is) more complex.
--p
This archive was generated by hypermail 2b28 : Fri Jul 21 2000 - 07:48:56 EEST