Boost logo

Boost Users :

From: Tim Blechmann (tim_at_[hidden])
Date: 2008-03-23 07:32:50


> Does anyone know if the fast_pool_allocator is supposed to work in a
> multithreaded environment? I know that it is "thread-safe," but I'm
> getting some really discouraging test results from it. Namely, using
> fast_pool_allocator is consistently performing about 10 times SLOWER for
> me than new/delete whenever multiple threads are involved. I've tested
> and come up with the same results on three different platforms: Mac,
> Linux and Windows (MSVC).

from my understanding, the pool implementations of boost use a global
lock, so it doesn't scale very well in multithreaded environments ...

the memory allocators on most systems avoid locking by using thread-
specific caches ... or, like the streamflow library, use lock-free
algorithms ...

best, tim

-- 
tim_at_[hidden]
http://tim.klingt.org
Which is more musical, a truck passing by a factory or a truck passing
by a music school?
  John Cage

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net