Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2003-01-30 12:44:33


David Abrahams <dave_at_[hidden]> writes:

> "Peter Dimov" <pdimov_at_[hidden]> writes:
>
>> From: "David Abrahams" <dave_at_[hidden]>
>>> "Peter Dimov" <pdimov_at_[hidden]> writes:
>>>
>>> > I've taken the liberty to convert the patch into
>> detail/quick_allocator.hpp.
>>> > #define BOOST_SP_USE_QUICK_ALLOCATOR to make shared_ptr use it.
>>> > shared_ptr_alloc_test.cpp has been updated, too. You can now compare
>>> > quick_allocator vs SGI std::allocator yourself. :-)
>>>
>>> I'm not all set up to run those tests and measure the times, which is
>>> why I was hoping Philippe would check it out.
>>
>> There is a test in libs/smart_ptr/test called shared_ptr_alloc_test.cpp that
>> you can use.
>
> Your test doesn't seem to terminate for me in a reasonable amount of
> time (minutes) in any configuration.

That was Cygwin GCC-3.2.

With mingw-2.95.3, once I figured out how to get it to detect that
threading was not actually enabled, there was a very small improvement
by using the quick allocator in single-threaded mode. In
multithreaded mode there was no substantial improvement at all (in
some cases the numbers were worse).

Incidentally, there seems to be no way to detect whether threading
support has been enabled (with -mthread) in Cygwin GCC: from the specs
file it looks to me like it only sets a preprocessor symbol in
-mno-cygwin (mingw) mode.

-- 
                       David Abrahams
   dave_at_[hidden] * http://www.boost-consulting.com
Boost support, enhancements, training, and commercial distribution

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