Re: [Boost-bugs] [Boost C++ Libraries] #3789: boost::object_pool::free() is very slow.

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #3789: boost::object_pool::free() is very slow.
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2016-05-07 00:14:49


#3789: boost::object_pool::free() is very slow.
----------------------------------+-------------------------
  Reporter: Dai Yun <dy95020@…> | Owner: johnmaddock
      Type: Bugs | Status: new
 Milestone: To Be Determined | Component: pool
   Version: Boost 1.41.0 | Severity: Problem
Resolution: | Keywords: object_pool
----------------------------------+-------------------------

Comment (by anonymous):

 I think there is a much better solution than those previously proposed.

 The object pool currently contains a single linked list of free objects,
 which makes it o(1) to allocate a single object. Why not simply to have
 two linked lists -- one for freed objects and one for allocated objects?
 Then freeing all allocated objects becomes O(N) and freeing N objects
 manually is also O(N).

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/3789#comment:16>
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:20 UTC