|
Boost : |
From: David Abrahams (dave_at_[hidden])
Date: 2003-01-30 13:11:04
"Peter Dimov" <pdimov_at_[hidden]> writes:
>
> You might need to use a lower n. Here's what I get (randomly choosing
> g++/mingw):
>
> GNU C++ version 2.95.3-6 (mingw special)
> Win32
> SGI standard library
> BOOST_HAS_THREADS: (not defined)
> BOOST_SP_USE_STD_ALLOCATOR: (not defined)
> BOOST_SP_USE_QUICK_ALLOCATOR: (not defined)
> 1048576 shared_ptr<int> allocations + deallocations:
> 1.582 seconds.
> 1.713 seconds.
> 1.702 seconds.
> 1048576 shared_ptr<X> allocations + deallocations:
> 1.151 seconds.
> 1.593 seconds.
> 1.603 seconds.
> 1048576 shared_ptr<Y> allocations + deallocations:
> 1.652 seconds.
> 1.071 seconds.
> 1.072 seconds.
> 1048576 shared_ptr<Z> allocations + deallocations:
> 1.713 seconds.
> 1.732 seconds.
> 1.722 seconds.
>
> GNU C++ version 2.95.3-6 (mingw special)
> Win32
> SGI standard library
> BOOST_HAS_THREADS: (not defined)
> BOOST_SP_USE_STD_ALLOCATOR: (not defined)
> BOOST_SP_USE_QUICK_ALLOCATOR: (defined)
> 1048576 shared_ptr<int> allocations + deallocations:
> 1.151 seconds.
> 0.961 seconds.
> 0.931 seconds.
> 1048576 shared_ptr<X> allocations + deallocations:
> 0.571 seconds.
> 0.551 seconds.
> 0.571 seconds.
> 1048576 shared_ptr<Y> allocations + deallocations:
> 0.761 seconds.
> 0.55 seconds.
> 0.54 seconds.
> 1048576 shared_ptr<Z> allocations + deallocations:
> 0.941 seconds.
> 0.921 seconds.
> 0.951 seconds.
Wow, that's a much bigger improvement than I saw! I wonder why?
-- 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