Boost logo

Boost :

Subject: Re: [boost] [lockfree] Faster ring-buffer queue implementation
From: tim (tim_at_[hidden])
Date: 2014-01-15 20:26:42


> some time ago I've implemented lock-free multi-producer multi-consumer
> queue on ring buffer and recently I've compared it's performance with
> current (Boost 1.55.0) boost::lockfree::queue - it shows 50% better
> performance. I've made just a quick glance on the Boost implementation
> and noticed that it uses CAS operations which is basically slower than
> simple RMW (atomic increment in our case) on modern x86-64 hardware.
>
> Maybe I've made some mistake in boost::lockfree::queue usage. If so then
> I'll be obliged for pointing me out the problem in my benchmark.
> Otherwise I'm wondering if it has sense to integrate the queue
> implementation into boost::lockfree?

nothing wrong, just comparing a bounded with an unbounded algorithm is
like comparing apples with oranges. but for the case of a bounded queue
(lockfree::queue and fixed_sized<> or capacity<>) it could make sense to
make use of it!

tim


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk