Introducing Colony - a vector-ish C++ container without pointer/iterator invalidation

Hi all-
in case any of you are interested, this is the vector-like container I've been working on:
http://www.xpfree.org/plf/plf_colony.htm

Because of the way it's implemented, it has no iterator and/or pointer invalidation. It is best suited for unordered data, although it can be sorted using swaps, and it's performance is better than a vector for larger-than-POD types (with scaling performance advantage the larger the types are).
And for anything involving significant amounts of non-end erase, it is many powers of 10 faster than a vector.
More details are on the website, including a brief visual explanation and benchmarks (MSVC2013 pending, the others are covered).

For certain aspects the syntax semantics are slightly different to vector, so do read the function descriptions. I have a little work to do on the allocator support as per discussion with JLBorges.
If anyone has any comments or anything, just email me - I may not have time to check back here.
Matt
Looks nice, however it sounds a lot like std::deque. Try doing some testing against std::deque and see how it compares.
Have you tried also comparing to std::list and std::multiset in your benchmarks?

It looks like you optimized for speed of insertion/removal instead of iteration, could you list some cases when speed of iteration is unimportant?
Topic archived. No new replies allowed.