c++ - Alternative to std::vector to store a sequence of objects -


i dealing several million data elements accessed sequentially. elements grow , shrink in known chunk sizes in predictable manner.

i looking efficient collection similar std::vector not reallocate holds data in multiple chunks of memory. whenever push more objects in collection , if last chunk exhausted, new chunk gets created , populated. not keen have random access operator. cannot use std::list due performance issues , few other issues beyond scope of question @ hand.

is there ready made collection fits requirement in boost or other library. want make sure there nothing available of shelf before try , cook myself.

it sounds me best bet many std::vectors stored within b-tree. b-tree lets refer areas in memory without visiting them during tree traversal, allowing minimal file access.


Comments

Popular posts from this blog

c# - Operator '==' incompatible with operand types 'Guid' and 'Guid' using DynamicExpression.ParseLambda<T, bool> -