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: 2013-06-07 23:03:13


#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 was recently hit by this problem. In my application, if I use
 boost::object_pool, it runs 12 seconds. Through profiling, I know it was
 due to find_prev(). So I replaced it with boost:pool. Now it finishes in 1
 second.

 I was wondering if we can simply do the following change to fix the
 problem?

     void free BOOST_PREVENT_MACRO_SUBSTITUTION(element_type * const chunk)
     { //...
       store().ordered_free(chunk);
     }
 to

     void free BOOST_PREVENT_MACRO_SUBSTITUTION(element_type * const chunk)
     { //...
       store().free(chunk);
     }

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