Boost logo

Boost :

From: Alexander Nasonov (alnsn-boost_at_[hidden])
Date: 2005-06-13 05:33:39

Maxim Yegorushkin writes:
> For example, I had a router which used a TCP binary protocol. Each message
> is prefixed with 4 byte length, so I read the 4 bytes, resized a
> std::vector<char> for the message length, and then read the message into
> the vector. After profiling the router under heavy load it turned out that
> 30% of user time was spent in guess where? In zeroing out memory in
> std::vector<char>::resize(). And you are talking about data copying

This reminds me of recent post by Dave Harris:

Alexander Nasonov

Boost list run by bdawes at, gregod at, cpdaniel at, john at