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-04 05:27:02
#3789: boost::object_pool::free() is very slow.
----------------------------------------+-----------------------------------
Reporter: Dai Yun <dy95020@â¦> | Owner: edupuis
Type: Bugs | Status: assigned
Milestone: Boost 1.42.0 | Component: pool
Version: Boost 1.41.0 | Severity: Problem
Resolution: | Keywords: object_pool
----------------------------------------+-----------------------------------
Comment (by edupuis):
In fact the current implementation is as follows :
* O(1) for requesting an object, thus O(n) to request n objects;
* O(n) for releasing an object, thus O(n^2^) to release n objects;
* O(n) for deleting the pool.
In my opinion, it would be better if it was
* O(1) for requesting an object, thus O(n) to request n objects;
* O(1) for releasing an object, thus O(n) to release n objects;
* O(n^2^) for deleting the pool or O(1) if the user kindly released all
requested objects. Using a sort algorithm, it is perhaps possible to make
this O(n log n).
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/3789#comment:7> 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