[Boost-bugs] [Boost C++ Libraries] #4228: Associative containers performance

Subject: [Boost-bugs] [Boost C++ Libraries] #4228: Associative containers performance
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2010-05-17 15:33:03


#4228: Associative containers performance
--------------------------+-------------------------------------------------
 Reporter: psiha | Owner: djowel
     Type: Bugs | Status: new
Milestone: Boost 1.43.0 | Component: fusion
  Version: Boost 1.44.0 | Severity: Optimization
 Keywords: |
--------------------------+-------------------------------------------------
 The Boost.Fusion documentation states that associative containers provide
 efficient key-based access while this seems not to be so in reality
 (AFAICT the associative containers actually use vectors for their
 implementation).

 As reported in this post
 http://lists.boost.org/Archives/boost/2010/05/166358.php I have achieved
 meassurably better compile-time performance when using plain
 fusion::vectors with linear searches than with fusion::maps.
 Attached are two simple tests that try to demonstrate this (Steven
 Watanabe's template profiler 'says' that both approaches yield the same
 number of template instantiations).

 The reason that in my real life (much more complicated) project I get not
 only same but better performance with vectors might perhaps be that the
 find<> (linear search) on the 'main vector' might already be
 'cached'/instantiated by some other operation.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/4228>
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:03 UTC