[review] The review of boost::container::hub starts! April 16 - April 26
Dear users and members of Boost, I'm proud to announce that the formal review of Joaquín M López Muñoz's boost::container::hub container, for inclusion in the Boost.Container library, starts today ( in my timezone ;-) ), April 16, and runs through April 26. It may be downloaded from https://github.com/joaquintides/hub and the documentation may be found here: https://github.com/joaquintides/hub/blob/develop/README.md Anyone is welcome to post a review and/or take part in subsequent discussions (see below for review guidelines). Introduction ------------ boost::container::hub is a sequence container with O(1) insertion and erasure and element stability: pointers/iterators to an element remain valid as long as the element is not erased. boost::container::hub is very similar but not entirely equivalent to C++26 std::hive (hence the different naming, consult the section "Comparison with std::hive", for details): https://github.com/joaquintides/hub/blob/develop/README.md#comparison-with-s... boost::container::hub has excellent performance, you can see some benchmarks here: https://github.com/joaquintides/hub/blob/develop/README.md#performance Basic example: #include <boost/container/hub.hpp> #include <cassert> int main() { boost::container::hub<int> h; // Insert some elements and keep an iterator to one of them for(int i = 0; i < 100; ++i) h.insert(i); auto it = h.insert(100); for(int i = 101; i < 200; ++i) h.insert(i); // Erase some of the elements erase_if(h, [](int x) { return x % 2 != 0;}); assert(*it = 100); // iterator still valid // Insert many more elements for(int i = 200; i < 10000; ++i) h.insert(i); assert(*it = 100); // iterator still valid } An important tradeoff when using boost::container::hub is the fact that the user can't control the position where a new element will be inserted: boost::container::hub reuses the memory addresses of previously erased elements to maximize performance and keep the data structure as compact as possible. The primary use case for boost::container::hub is in high-performance scenarios where elements are created and destroyed frequently, insertion order is not relevant and pointer/iterator stability is required: game entity systems, particle simulation, HFT... For more information, see the Tutorial section: https://github.com/joaquintides/hub/blob/develop/README.md#tutorial Review guidelines ----------------- Please provide in your review whatever information you think is valuable to understand your final choice of ACCEPT or REJECT including Fit as a Boost component. Please be explicit about your decision. Some other questions you might want to consider answering: - What is your evaluation of the design? - What is your evaluation of the implementation? - What is your evaluation of the documentation? (Note that, if accepted, final documentation will be included in Boost.Container docs, so please review the content, not the format) - What is your evaluation of its potential usefulness? - Did you try to use the container? With which compiler(s)? Did you have any problems? - How much effort did you put into your evaluation? A glance? A quick reading? In-depth study? - Are you knowledgeable about the problem domain? More information about the Boost Formal Review Process can be found here: http://www.boost.org/community/reviews.html Kind regards, Ion Gaztañaga, Review manager
participants (1)
-
Ion Gaztañaga