On Tue, Dec 7, 2010 at 9:19 PM, Yang Zhang <[email protected]> wrote:
> > Also, note that if you explicitly compile C++ versions of your > > messages and link them into the process, they'll be even faster. (If you > > don't, the library falls back to DynamicMessage which is not as fast as > > generated code.) > > I'm trying to decipher that last hint, but having some trouble - what > exactly do you mean / how do I do that? I'm just using protoc > --py_out=... and PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=cpp. > I'm not completely sure what I mean, because I don't have much experience with Python C Extensions. Basically I'm saying you should additionally generate C++ code using protoc, the compile that into a C extension (even with no interface), and then load it into your Python process. Simply having the C++ code for your message types present will make them faster. -- 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.
