Re: [protobuf] Efficiently reading/writing multiple messages in C++

2013-06-27 Thread Feng Xiao
The fast path only works if the optimize_for option is set to SPEED in the proto file. If that's not the case, just use approach 2. If you enabled the optimize_for option and want to take advantage of the fast path, 3) seems to be a reasonable approach. The code should be similar to the

Re: [protobuf] Efficiently reading/writing multiple messages in C++

2013-06-26 Thread Hochhaus, Andrew
Does anyone have any insight on Evan's related question below? On Thu, Jun 17, 2010 at 5:05 PM, Evan Jones ev...@mit.edu wrote: Related question: If I am writing length-prefixed values, what is the best way to do this? I think there are 3 approaches: 1. out.WriteVarint32(msg.ByteSize());