All your favourite sausages can now be found on GitHub including
segmented_array.
https://github.com/FlibbleMr/neolib
"A segmented_array is a container implemented as both a linked list and
a red-black tree of fixed sized segments (vecarray arrays). Being a
segmented array (as opposed to a normal flat array) its elements are not
stored contiguously in memory but are contiguous within a segment.
Compared to a std::vector or std::deque it performs considerably better
at inserting/erasing elements at any point in the controlled sequence.
Random access performs well being O(lg N) complexity so performs
considerably better than std::list. push_back() and pop_back() are O(lg
N) complexity. Single element insert() and erase(), push_front() and
pop_front() are also O(lg N) complexity (an example which illustrates
this). The performance of multiple element insert() and erase() is
linear in the number of items inserted/erased."
/Flibble