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-08 10:42:38
#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):
Hi John,
The change I am proposing is possible (see ticket #6610); I would simply
modify object_pool call the non ordered version of malloc and free. I
would need also a member function 'order' who whould order the pool,
function that could be called in the destructor prior to applying the
method that destroys all non released object.
The pool.order() method would be O(n log n) complexity, using an in-place
merge sort.
This modification I am suggesting would not break the API, only speed-up
the free function and slow down the destructor, for those lazy programmers
that do not release all objects they have allocated...
Now that I have started digging into the code (I have already fixed
tickets #5902, #6561, #6701, #6865 and #6867 in the boost sandbox), I
agree with you that the design is weird and could be improved a lot.
For example, the fact that the user supplied allocator is made of static
non member functions makes it almost impossible to make something useful
of it.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/3789#comment:9> 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