Mathias Gaunard
On 21/08/2014 12:12, Joaquin M Lopez Munoz wrote:
Some months ago I explored a container-like construct for polymorphic objects that group elements by run-time type so as to greatly speed up for_each processing:
http://bannalia.blogspot.com.es/2014/05/fast-polymorphic-collections.html
IMHO you're comparing oranges and apples, the memory layout and traversal properties are entirely different.
Absolutely, this is precisely the point of the article: if you are managing
collections of polymorphics objects and traversal order is not relevant,
you are probably better off using something like poly_collection (or the
intrusive structure you mention) rather than
std::vector