I was doing a quick performance test on a block of code
void ConvertToFloat( const std::vector< short >& audioBlock, std::vec
out.resize( audioBlock.size() );
Since out's size (= 0) is lesser than audioBlock.size() , additional elements are created and appended to the end of the out. This creates the new elements by calling their default constructor.
out
audioBlock.size()
Reserve only allocates the memory.