5 Oct
2017
5 Oct
'17
8:20 a.m.
Den 05-10-2017 kl. 04:19 skrev degski via Boost:
On 4 October 2017 at 23:48, Benedek Thaler via Boost
wrote: As expected, both devector and batch_deque highly outperforms std::vector and queue in deserialization.
This sounds (to me) counterintuitive. Why is this the case?
Because they can avoid double initialization for some types. When using std::vector, you have to either A. reserve + load item to local object + push_back B. resize + delegate to bulk operation in Boost.Serialization The bulk operation is to prefer, but then requires redundant initialization in resize. kind regards Thorsten