[Boost-bugs] [Boost C++ Libraries] #2945: set, multiset, map and multimap don't take advantage of insert with hint api
- Next message: Boost C++ Libraries: "Re: [Boost-bugs] [Boost C++ Libraries] #2944: boost::archive::xml_iarchive hangs, if BOOST_SP_USE_PTHREADS used"
- Previous message: Boost C++ Libraries: "Re: [Boost-bugs] [Boost C++ Libraries] #2944: boost::archive::xml_iarchive hangs, if BOOST_SP_USE_PTHREADS used"
- Next in thread: Boost C++ Libraries: "Re: [Boost-bugs] [Boost C++ Libraries] #2945: set, multiset, map and multimap don't take advantage of insert with hint api"
- Reply: Boost C++ Libraries: "Re: [Boost-bugs] [Boost C++ Libraries] #2945: set, multiset, map and multimap don't take advantage of insert with hint api"
- Reply: Boost C++ Libraries: "Re: [Boost-bugs] [Boost C++ Libraries] #2945: set, multiset, map and multimap don't take advantage of insert with hint api"
- Reply: Boost C++ Libraries: "Re: [Boost-bugs] [Boost C++ Libraries] #2945: set, multiset, map and multimap don't take advantage of insert with hint api"
- Reply: Boost C++ Libraries: "Re: [Boost-bugs] [Boost C++ Libraries] #2945: set, multiset, map and multimap don't take advantage of insert with hint api"
- Reply: Boost C++ Libraries: "Re: [Boost-bugs] [Boost C++ Libraries] #2945: set, multiset, map and multimap don't take advantage of insert with hint api"
#2945: set, multiset, map and multimap don't take advantage of insert with hint
api
--------------------------+-------------------------------------------------
Reporter: Brian Wood | Owner: ramey
Type: Bugs | Status: new
Milestone: Boost 1.39.0 | Component: serialization
Version: Boost 1.38.0 | Severity: Optimization
Keywords: |
--------------------------+-------------------------------------------------
Several of the standard containers have an insert function
that can be used to improve the efficiency of adding
elements to them. Here is some code that uses this
function -- abt1 is a std::set<int>.
{{{
set<int>::iterator endIt1 = abt1.end();
for (unsigned int j0 = 1; j0 <= headCount[0]; ++j0) {
// load data into an int named rep.
abt1.insert(endIt1, rep);
}
}}}
It is possible someone may want to serialize a non-sorted
list<int> to a set<int>. In this case using the hinted
insert will be slightly slower than the non-hinted version.
This case is somewhat rare though in my opinion.
--
Ticket URL: <https://svn.boost.org/trac/boost/ticket/2945>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.
- Next message: Boost C++ Libraries: "Re: [Boost-bugs] [Boost C++ Libraries] #2944: boost::archive::xml_iarchive hangs, if BOOST_SP_USE_PTHREADS used"
- Previous message: Boost C++ Libraries: "Re: [Boost-bugs] [Boost C++ Libraries] #2944: boost::archive::xml_iarchive hangs, if BOOST_SP_USE_PTHREADS used"
- Next in thread: Boost C++ Libraries: "Re: [Boost-bugs] [Boost C++ Libraries] #2945: set, multiset, map and multimap don't take advantage of insert with hint api"
- Reply: Boost C++ Libraries: "Re: [Boost-bugs] [Boost C++ Libraries] #2945: set, multiset, map and multimap don't take advantage of insert with hint api"
- Reply: Boost C++ Libraries: "Re: [Boost-bugs] [Boost C++ Libraries] #2945: set, multiset, map and multimap don't take advantage of insert with hint api"
- Reply: Boost C++ Libraries: "Re: [Boost-bugs] [Boost C++ Libraries] #2945: set, multiset, map and multimap don't take advantage of insert with hint api"
- Reply: Boost C++ Libraries: "Re: [Boost-bugs] [Boost C++ Libraries] #2945: set, multiset, map and multimap don't take advantage of insert with hint api"
- Reply: Boost C++ Libraries: "Re: [Boost-bugs] [Boost C++ Libraries] #2945: set, multiset, map and multimap don't take advantage of insert with hint api"
This archive was generated by hypermail 2.1.7
: 2017-02-16 18:50:00 UTC