On May 3, 2010, at 13:10 , Kenton Varda wrote:
Interesting. Since this seems like a JVM implementation issue, I
wonder if the results are different on Dalvik (Android). Also, the
extra code sounds undesirable for lite mode, but my guess is that
you had to place this code inside CodedOutputStream which is shared
by lite mode. So yeah, there are some down sides. Not sure how I
feel about it.
Yes, I actually changed ByteString, since ByteString.copyFromUtf8 is
how protocol buffers get UTF-8 encoded strings at this point.
I can understand that viewpoint. As I said, I'm somewhat surprised
that this is faster, as I don't think there is a good reason for it.
It also uglifies the code a fair amount. I'm somewhat tempted to file
a JDK bug on this, but its unclear to me if that is actually a useful
What I should probably do is look at the JDK source, and figure out
*why* my code actually seems faster ...
You received this message because you are subscribed to the Google Groups "Protocol
To post to this group, send email to proto...@googlegroups.com.
To unsubscribe from this group, send email to
For more options, visit this group at