"Peter Dimov" <[EMAIL PROTECTED]> wrote in message
000901c2c7dc$e76195e0$1d00a8c0@pdimov2">news:000901c2c7dc$e76195e0$1d00a8c0@pdimov2...
> From: "Peter Dimov" <[EMAIL PROTECTED]>
> >
> > One easy way to estimate the impact of an optimized allocator is to
> #define
> > BOOST_SP_USE_STD_ALLOCATOR, to make shared_ptr use std::allocator. On
SGI
> > derived STLs, std::allocator is usually faster than plain new.
>
> I tried to do that myself but benchmark.cpp doesn't compile for me,
there's
> probably no timespec on Windows.

I have defined BOOST_SP_USE_STD_ALLOCATOR in benchmark.cpp (gcc 2.95):

Resources required by list< shifted_ptr<T> >(4000):
Arena 0:
system bytes     =     226820
in use bytes     =     226052
Total (incl. mmap):
system bytes     =     226820
in use bytes     =     226052
max mmap regions =          0
max mmap bytes   =          0
list shifted_ptr<T> took        0.0002951000 seconds to construct.
list shifted_ptr<T> took        7.1966276647 seconds to reconstruct 2000
times.
list shifted_ptr<T> took        5.0495961000 seconds to copy 2000 times.
list shifted_ptr<T> took        4.0016951000 seconds to sort 4000 times.
list shifted_ptr<T> took        0.1382300647 seconds to swap 500 times.
list shifted_ptr<T> took        0.0003241000 seconds to destroy.

Resources required by list< shared_ptr<T> >(4000):
Arena 0:
system bytes     =     325124
in use bytes     =     321988
Total (incl. mmap):
system bytes     =     325124
in use bytes     =     321988
max mmap regions =          0
max mmap bytes   =          0
list shared_ptr<T> took 0.0004259000 seconds to construct.
list shared_ptr<T> took 14.0157271000 seconds to reconstruct 2000 times.
list shared_ptr<T> took 5.0331178000 seconds to copy 2000 times.
list shared_ptr<T> took 4.0376376000 seconds to sort 4000 times.
list shared_ptr<T> took 0.1449102647 seconds to swap 500 times.
list shared_ptr<T> took 0.0004831000 seconds to destroy.



Philippe A. Bouchard




_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Reply via email to