Hi all,
As you know if you've read the docs carefully, when using C++ or Java
protocol buffers, for best performance you need to add a line to your .proto
files:

  option optimize_for = SPEED;

Otherwise, by default, the compiler optimizes for code size.  Optimizing for
code size results in generated code that around a half to a third of the
size, but runs an order of magnitude slower.  We make this the default
because inside Google we've found that code bloat from lots of generated
code is a serious problem, and we find that we only actually care about
speed for a small minority of protocols.  However, now I'm worried that
users who care about speed may be missing the documentation mentioning this
attribute, and may as a result think protocol buffers are slower than they
are.  Code size tends only to be a problem for users who have lots and lots
of protocols, where most only have as small number.

So, tell me:  What should the default be?  I think we can pretty safely
change the default to SPEED in the next version, but if we do, it will be
less safe to change the default back to CODE_SIZE in the future.

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to