Thanks for fast replay.
I understand you matters.

You can add mass assignment to your array operations and that would
keep you design intact and complete array operation needs.
It is already possible to reserve and access entire array but you can
only assign one element at a time.

On Jan 7, 6:00 pm, Evan Jones <> wrote:
> On Jan 7, 2010, at 17:41 , Vlad wrote:
> >  inline const ::std::string& name() const;  //problem here need
> > creation of string -> very slow!
> This doesn't create a string, it just returns a reference to the  
> string already in the protocol buffer object. If you do:
> const char* c_string =
> this gets a pointer to the raw C string inside the C++ string object  
> inside the protocol buffer object. No allocations or copies will be  
> performed. Setting the string, one copy is always performed, as Kenton  
> mentioned.
> Evan
> --
> Evan Jones
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To post to this group, send email to
To unsubscribe from this group, send email to
For more options, visit this group at

Reply via email to