2009/8/20 Michael Poole <mdpo...@troilus.org>:
> roger peppe writes:
>> the documentation says, on writing fields in order: "This allows
>> parsing code to use optimizations
>> that rely on field numbers being in sequence."
>>
>> what optimizations might these be?
>> does the current implementation use any such optimizations?
>> what penalty do i pay by *not* writing fields in order?
>
> The C++ generator does this.  If you look at some of the generated
> MergePartialFromCodedStream() methods, you can see how this is done.

interesting, i hadn't noticed that.

not an easy trick to pull in a language without goto, i'd think.

tail recursion optimisation could make it possible, i suppose,
assuming the function call was cheaper than the switch.

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