On Sun, Nov 6, 2016 at 1:25 PM, Joaquin M López Muñoz < joaquinlopezmunoz@gmail.com> wrote:
A couple of years ago I wrote two blog entries about high-performance data structures for polymorphic objects:
http://bannalia.blogspot.com/2014/05/fast-polymorphic-collections.html http://bannalia.blogspot.com/2014/05/fast-polymorphic-collec tions-with.html
that spurred some interest in the community. Now I've had the time to turn these ideas into something resembling a full-fledged library:
https://github.com/joaquintides/poly_collection http://rawgit.com/joaquintides/poly_collection/website/doc/html/index.html
and I'd be very grateful if people could give their opinion on usefulness, design, etc. so as to determine potential interest in an eventual official submission to Boost.
Sounds great Joaquin. But what if I need the equivalent of Multi-Index? I have several indexes on the base interface (ByGuid unique, ByNKey unique, ByParent non-unique, ByType non-unique, etc...), so am I stuck into heap-based classic OOP because I need those? Also, you provide "by *concrete* type" access to a segment, but often time we're also interested in "by *abstract* base" access/traversal, the base not necessarily being the one from the container itself. Any thoughts on that? Of course, you can't do "isAssigneableFrom()" tests using just std::typeid(), so a custom RTTI mechanism is necessary, but implicit traversal of all the "derived" segments for any particular abstract type would be really useful IMHO. Finally, can you share any compile-time impact, between you any_... and poly_... benchmarks for example? Thanks, --DD PS: Would VS2013 work with it too? I'm currently stuck with that one...