0

Are the look-up performances for boost::unordered_map's and boost::multi_index containers (with a hashed unique index) the same. I imagine that in boost::multi_index containers you have to do two look-ups: firstly, in a table that represents the hashed index (and contains a pointer to the actual value associated with that key) and a second look-up due to the fact that you need to follow that pointer to get to your value. It seems that the boost::unordered_map implementation might avoid this second look-up (and therefore be faster).

user809409
  • 491
  • 7
  • 10

1 Answers1

2

Lookup performance should be exactly the same --Boost.Multiindex internal structure does not involve extra indirections as you seem to assume. In any case, when in doubt profile and see by yourself.