Boost logo

Boost :

From: Caleb Epstein (caleb.epstein_at_[hidden])
Date: 2005-04-25 10:34:10

On 4/24/05, Peter Dimov <pdimov_at_[hidden]> wrote:

> What are the design goals of read_write_mutex? (Lock proliferation aside for
> a moment.)

Attached is a copy of the test program modified to use the ACE library
and to use n_writers = 1. Performance of the two cases is much
closer, though the read-write case still suffers compared to the
simple mutex case and is really platform-dependant. Here are my
results (where rwlock-ace is the simple case and rwlock-ace-rw is the
read/write case):

./rwlock-ace 3.90s user 14.54s system 326% cpu 5.648 total
./rwlock-ace-rw 6.94s user 26.57s system 226% cpu 14.776 total

Solaris/Sun C++:
./rwlock-ace-sun 7.64s user 50.66s system 691% cpu 8.427 total
./rwlock-ace-sun-rw 34.19s user 250.70s system 465% cpu 1:01.18 total

I'd say the design of the Boost.Threads read/write mutex is
sub-optimal compared to the one on ACE.

Caleb Epstein
caleb dot epstein at gmail dot com

Boost list run by bdawes at, gregod at, cpdaniel at, john at