|
Boost : |
Subject: Re: [boost] [container] boost::container::vector, hybrid_vector, and performance
From: Andrew Hundt (athundt_at_[hidden])
Date: 2013-02-13 11:33:56
On Wed, Feb 13, 2013 at 9:36 AM, Adam Wulkiewicz
<adam.wulkiewicz_at_[hidden]>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
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk