Opened 9 years ago
Last modified 4 years ago
#9382 new Feature Requests
flat_stable associative containers.
Reported by: | Owned by: | Ion Gaztañaga | |
---|---|---|---|
Milestone: | To Be Determined | Component: | container |
Version: | Boost 1.55.0 | Severity: | Not Applicable |
Keywords: | Cc: |
Description
I think it would be interesting to have flat associative containers based on the stable_vector implementation.
From my understanding of the flat_ containers and stable_vector we may have a good mix of access performance and insert performance.
Maybe it's not a real need thanks to C++11 optimization (move, RVO...), I'm still discovering the new standard.
Congratulation for the job done in the container lib, it's impressive to see what new implementations can bring.
Vincent
Change History (2)
comment:1 by , 4 years ago
comment:2 by , 4 years ago
In recent Boost versions you can already choose the underlying sequence type:
typedef flat_map
< key_type , mapped_type , comp , stable_vector< std::pair<key_type, mapped_type> >
flat_stable_map_t;
I've seen lot of code that depends on pointer stability that std:: set or map give them so I think this might get some things improved. Furthermore, iterating through such containers seems to be more frequent than it should.