Boost logo

Boost :

Subject: [boost] boost::shared_mutex performance
From: Tim Blechmann (tim_at_[hidden])
Date: 2009-04-05 15:31:02


hi all,

i did some performance tests of boost::shared_mutex and a wrapper class
to posix pthread_rwlock_t, which provides most of the interface from the
sharedlockable concept (without the timed locking, which should be easy
to add).

i am not sure, whether the boost::shared_mutex class is supposed to give
some guaranties (like fairness), that my wrapper implementation doesn't
provide ... it does outperform the boost::shared_mutex implementation by
a factor of about 2.5, though (linux, x86_64)

benchmark code and wrapper class are attached. seeing these speedups,
would it be reasonable to introduce a boost::native_shared_mutex class,
based on a native implementation?

best, tim

-- 
tim_at_[hidden]
http://tim.klingt.org
The first question I ask myself when something doesn't seem to be
beautiful is why do I think it's not beautiful. And very shortly you
discover that there is no reason.
  John Cage.







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