Le 01/03/2017 à 09:32, Joaquin M López Muñoz via Boost a écrit :
Hello,
I'd like to ask for formal review of (candidate) Boost.PolyCollection, a library providing fast containers of polymorphic objects:
https://github.com/joaquintides/poly_collection http://blincubator.com/bi_library/polycollection/?gform_post_id=1643 http://rawgit.com/joaquintides/poly_collection/website/doc/html/index.html
Typically, polymorphic objects cannot be stored directly in regular containers and need be accessed through an indirection pointer, which introduces performance problems related to CPU caching and branch prediction. Boost.PolyCollection implements a novel data structure that is able to contiguously store polymorphic objects without such indirection, thus providing a value-semantics user interface and better performance. Three polymorphic collections are provided:
* boost::base_collection * boost::function_collection * boost::any_collection
dealing respectively with classic base/derived or OOP polymorphism, function wrapping in the spirit of std::function and so-called duck typing as implemented by Boost.TypeErasure.
The library compiles and runs succesfully in Visual Studio 2015, GCC 5.2.1 and Clang 3.7. Ion Gaztañaga has kindly volunteered to act as the review manager for (candidate) Boost.PolyCollection. Hi,
thanks for proposing this library Joaquîn.
I've surely missed why base_collection is named this way. Is it because
the parameter is a base class. Could you confirm?
On the documentation you compare
base_collection<T> and ptr_vector<T>
function_collection