|
Boost : |
From: William Kempf (sirwillard_at_[hidden])
Date: 2000-09-12 13:53:27
I've updated the Win32 implementation again. This version was
compiled with gcc (using Dev-C++ IDE, which I *think* uses mingwin),
so the code is closer to ANSI compliant. Other than that, the
implementation is the same.
Included is a test harness for doing speed comparisons of Win32
critical sections, Win32 mutexes and the libraries implementation of
mutex. The results of the timings (one run, so give or take some):
Compiled with VC++
boost::mutex was 5.68 x faster than Win32 mutex
boost::mutex was 9.93 x slower than Win32 critical section
Compiled with gcc
boost::mutex was 2.63 x faster than Win32 mutex
boost::mutex was 18.03 x slower than Win32 critical section
I assume the terrible results using gcc can be attributed to my
ignorance of the compiler. Having no idea what the command line
options are I assume there were no optimizations used by the
compiler. If anyone knows of a windows .hlp file for gcc available
on the net, I'd appreciate an e-mail. If I'm going to work on Boost
libraries, I think it's time I became familiar with a more compliant
compiler such as gcc.
Bill Kempf
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk