In game development and many other high-performance, highly-modular development architectures, maintaining valid references to container elements regardless of erasure and insertion is often crucial. While there are many workarounds for this, typically using std::vector<>
with various methods to avoid invalidation, to date there exist no generalized solutions to the problem which also provide strong cache performance. plf::colony<>
, a proposed unordered container class from the SG14 working group
, is one attempt to remedy this situation: it provides fast insertion, erasure and iteration performance while maintaining pointer stability to non-erased elements, which is unaffected by both insertion and erasure.
In this talk we’ll explore both the structure and comparative performance of plf::colony<>
, contrasting it with other standard library containers and their potential modifications, showing how it can outperform many typical alternatives where large amounts of insertions and erasures are concerned. This will include details on:
If you’re not interested in new containers, you may still pick up a few concepts to help you with improving your own implementations and high-performance C++ code. If you are interested in better containers, or better container usage, you should definitely attend this talk.