mattreecebentley / plf_colony

An unordered C++ data container providing fast iteration/insertion/erasure while maintaining pointer/iterator validity to non-erased elements regardless of insertions/erasures. Provides higher-performance than std:: library containers for high-modification scenarios with unordered data.
https://plflib.org/colony.htm
zlib License
398 stars 33 forks source link

[Feature request] Consider adding push/emplace_back() proxies. #40

Closed Convery closed 3 years ago

Convery commented 3 years ago

Was recently playing around with plf::colony (it's great) and wanted to update some utilities to use it instead of std::vector. While insert() covers the functionality needed, consider adding proxies for it matching the std::vector methods so that other developers can search and replace in their codebases.

mattreecebentley commented 3 years ago

Hiya, I think invalidates the current assumptions about the container (insertion implacement is considered unordered, random). If we start giving the option to do that, it means people with a low understanding of how the container functions will end up using it, not realising that this reduces iteration peformance and cache locality. I'm interested in any other thoughts you have on the subject, but I think this is probably a no-go.