Performance considerations - for marshalling, iterative resizing of the output buffer is a fundamental operation. <code>std::vector</code> and <code>mutable_shared_buffer</code> <code>resize</code> methods use efficient logic for internal buffer allocations (<code>mutable_shared_buffer</code> uses <code>std::vector</code> internally). Custom containers used as the buffer parameter should have similar efficient <code>resize</code> method logic. Calling <code>reserve</code> at appropriate places may provide a small performance increase, at the cost of additional requirements on the buffer type.</dd></dl>
0 commit comments