Subject: Re: [Boost-bugs] [Boost C++ Libraries] #3789: boost::object_pool::free() is very slow.
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2012-05-10 21:10:58
#3789: boost::object_pool::free() is very slow.
----------------------------------------+-----------------------------------
Reporter: Dai Yun <dy95020@â¦> | Owner: edupuis
Type: Bugs | Status: closed
Milestone: Boost 1.42.0 | Component: pool
Version: Boost 1.41.0 | Severity: Problem
Resolution: fixed | Keywords: object_pool
----------------------------------------+-----------------------------------
Changes (by edupuis):
* status: assigned => closed
* resolution: => fixed
Comment:
(In [78412]) Added a pool.order() function, which transforms an unordered
pool into an ordered one. Call this function in
object_pool::~object_pool() if suitable, which allows to use pool.malloc()
and pool.free() instead of pool.ordered_malloc() and pool.ordered_free().
This changes the complexity of object_pool.destroy(), going from O(n) to
O(1), while the complexity of the destructor goes from O(n) to O(n log n)
if the pool user has not released all pool objects, otherwise the
destructor is O(1).
This fixes #3789 and makes it possible to have pools holding millions of
objects.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/3789#comment:11> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:09 UTC