
On Wed, Feb 13, 2013 at 9:36 AM, Adam Wulkiewicz <adam.wulkiewicz@gmail.com>wrote:
You're right. And this is what makes containers fast - locality and size for better caching, smaller methods for inlining. Because of that varray will probably always be faster than any vector. We were more concerned about the container::vector performance in relation to std::vector.
Yes, one of the main points was the performance gap between std::vector and container::vector. The varray benchmark just happened to be the way I noticed the gap. The other point was regarding the hypothetical hybrid_vector that was discussed in previous varray/static_vector threads, asking if a stack allocator with a normal allocation fallback is perhaps a reasonable substitute that would have comparable performance. If so it seems like hybrid_vector wouldn't perform that well possibly due to branching for the stack vs allocator cases and thus wouldn't make as much sense to implement. However, I wasn't certain if there may be some critical difference I am missing that someone could shed light on. Cheers! Andrew Hundt