Subject: [boost] [lockfree] Faster ring-buffer queue implementation
From: Alexander Krizhanovsky (ak_at_[hidden])
Date: 2014-01-15 13:32:19
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?
The algorithm description is available at
The source code of the queue with the benchmark for
And the benchmark results are available here:
-- Alexander Krizhanovsky NatSys Lab. (http://natsys-lab.com) tel: +7 (916) 717-3899, +7 (499) 747-6304 e-mail: ak_at_[hidden]
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk