[protobuf] Repeated fields support efficient random access?

2011-08-22 Thread Tommy Li
Hi, are repeated fields supposed to support efficient random access?
Or should we copy the data to an Array before we start doing random
access on it?

-- 
You received this message because you are subscribed to the Google Groups 
Protocol Buffers group.
To post to this group, send email to protobuf@googlegroups.com.
To unsubscribe from this group, send email to 
protobuf+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/protobuf?hl=en.



Re: [protobuf] Repeated fields support efficient random access?

2011-08-22 Thread Henner Zeller
On Sun, Aug 21, 2011 at 22:24, Tommy Li tommy...@ucla.edu wrote:
 Hi, are repeated fields supposed to support efficient random access?

In the in-memory representation of the protocol buffer, they are
essentially stored in an array. So copying it to an array wouldn't buy
you anything

 Or should we copy the data to an Array before we start doing random
 access on it?

 --
 You received this message because you are subscribed to the Google Groups 
 Protocol Buffers group.
 To post to this group, send email to protobuf@googlegroups.com.
 To unsubscribe from this group, send email to 
 protobuf+unsubscr...@googlegroups.com.
 For more options, visit this group at 
 http://groups.google.com/group/protobuf?hl=en.



-- 
You received this message because you are subscribed to the Google Groups 
Protocol Buffers group.
To post to this group, send email to protobuf@googlegroups.com.
To unsubscribe from this group, send email to 
protobuf+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/protobuf?hl=en.