On the theme of "contiguous enables fast":
Fast Polymorphic Collections
by Joaquín M López Muñoz
From the article:
poly_collection
behaves excellently and is virtually not affected by the size of the container. For n < 105, the differences in performance betweenpoly_collection
and a std::vector ofstd::unique_ptr
s are due to worse virtual call branch prediction in the latter case; whenn > 105
, massive cache misses are added to the first degrading factor.
Add a Comment
Comments are closed.