|
Boost : |
From: Peter Dimov (pdimov_at_[hidden])
Date: 2008-05-03 19:10:19
I've added sp_atomic_mt2_test.cpp:
http://svn.boost.org/trac/boost/browser/trunk/libs/smart_ptr/test/sp_atomic_mt2_test.cpp
to the SVN; this is a reader/writer performance test that can be used to
compare the performance of a detail::lightweight_mutex, boost::shared_mutex
and the new atomic access operations for shared_ptr. It accepts command line
options that can be used to achieve a variety of scenarios.
I'm currently seeing a plain mutex (maps to a CRITICAL_SECTION)
outperforming shared_mutex for the default configuration of read/write ratio
100:1, vector size (operation cost) 10000, no matter how many threads I use
on a dual CPU box on Windows. This seems somewhat suspicious and may
indicate a bug in the test. Any comments are welcome. :-)
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk