|
Boost : |
Subject: Re: [boost] [lockfree::fifo] Review
From: Tim Blechmann (tim_at_[hidden])
Date: 2009-12-12 08:54:11
>> i just went through the replies ... (maybe i should upcase some parts in
>> the documentation, that the implementation focus on WORST CASE, not
>> AVERAGE CASE performance ... people keep complaining that the stack/fifo
>> may be outperformed be blocking algorithms, which is both true and
>> irrelevant for me, as these implementations are soft real-time safe (and
>> could be made hard real-time safe).
>
> Agreed.
> Are you planning to augment your library with algorithms for different
> needs? Like MPSC, SPMC and so forth? I think that could be useful,
> because it looks like implementing the most generic MPMC case won't give
> you the best results.
i just added a lock-free single-producer/single-consumer ringbuffer to
my git repository, branch topic/spsc_ringbuffer ... it implements an
algorithm, that is commonly found in open source audio applications ...
performs about 8 times faster than the m-s fifo queue (which is based on
linked lists).
it comes in two versions:
template <typename T, size_t size>
class ringbuffer;
template <typename T>
class ringbuffer<T, 0>;
in the first version the size is set at compile time, in the second
version at run time (during the construction).
tim
-- tim_at_[hidden] http://tim.klingt.org You can play a shoestring if you're sincere John Coltrane
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk