7

C++ Boost has Bimap container that is a bidirectional map: http://www.boost.org/doc/libs/1_43_0/libs/bimap/doc/html/index.html

Does anyone know the performance of Boost::bimap? I mean what's the time complexity of accessing an element in the map? Is it as quick as unordered_map access (which is O(1))?

Thanks!

jdehaan
  • 19,700
  • 6
  • 57
  • 97
user414585
  • 715
  • 2
  • 8
  • 14
  • 1
    It depends on the collection type you're accessing through. Without the type definition it's impossible to say. In general I believe that the individual collection types have the same runtime complexities as their "standalone implementation" counterparts. – David Joyner Aug 08 '10 at 23:01

1 Answers1

6

AFAIK each different container of this library have different operation complexity relative to the implementation (like for the stl containers). For details necessary to make your choice, read : http://www.boost.org/doc/libs/1_43_0/libs/bimap/doc/html/boost_bimap/the_tutorial/controlling_collection_types.html

Klaim
  • 67,274
  • 36
  • 133
  • 188