On Aug 23, 2010, at 11:41 , achintms wrote:
Thanks Evan. That was very helpful. I got rid of the external object and created the internal objects directly. After that the only part that was taking time was decoding. I like the idea of using bytes for serialization and do my own encoding/decoding on top of that. That way I can delay decoding until it is needed. For example for comparisons I should just be able to use the bytes.
This is true, provided that everyone uses the same encoding without any bugs, and canonicalizes Unicode in the same way (http://unicode.org/reports/tr15 ). In general, this is tricky, and I would suggest using the built-in string type. However, if you have a very specific need, and the decoding is a bottleneck, this should work.
Also do you think that if I encode/decode using utf-16 it would be faster? Clearly it is not as compressed.
I would think it should be, but I haven't done any performance measurements, so I can't confirm 100% that this is the case.
Evan -- Evan Jones http://evanjones.ca/ -- You received this message because you are subscribed to the Google Groups "Protocol Buffers" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/protobuf?hl=en.
