You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Protocol Buffers
Hi,
How do Protocol Buffers compare in serialization/deserialization speed
to pickle (not cpickle)?
I'm looking for ways to persist structured data to the App Engine
datastore BlobProperty. Since it's App Engine cpickle isn't an
option.
I realize that protocol buffers has some advantages over pickle
already (from the docs):
1. it doesn't deal well with schema evolution
2. sharing data with application written in C++ or Java
The first one is a concern, the second one not so much. I'm sure I'll
eventually do my own performance testing, but was more curious if
speed optimization was an objective for the python implementation.
Thanks!
Joe
Christian Scholz / Tao Takashi (SL)
unread,
Jul 10, 2008, 12:33:02 PM7/10/08
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Joe K, Protocol Buffers
I mentioned ProtocolBuffers today here at EuroPython and somebody mentioned that in the future the runtime also might use some C++ routines to do conversions. But then the question might be how it compares against cpickle I guess ;-)
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Joe K, Petar Petrov, Protocol Buffers
I don't think the Python code has been heavily-optimized. Petar (cc'd) may be able to say more about this. Long-term, we're toying with the idea of off-loading serialization to C++ for cases where speed is critical.
If you do performance tests, I'd be interested to hear the results.
Auke Booij
unread,
Jul 10, 2008, 12:59:36 PM7/10/08
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Protocol Buffers
last time i converted a python program to a C++ program (some
relatively simple looping), it only doubled the speed. just fyi.
On Jul 10, 6:42 pm, "Kenton Varda" <ken...@google.com> wrote:
> I don't think the Python code has been heavily-optimized. Petar (cc'd) may
> be able to say more about this. Long-term, we're toying with the idea of
> off-loading serialization to C++ for cases where speed is critical.
> If you do performance tests, I'd be interested to hear the results.
>
Petar Petrov
unread,
Jul 10, 2008, 1:49:45 PM7/10/08
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Kenton Varda, Joe K, Protocol Buffers
We are just beginning to optimize the python API and/or are even looking for alternatives like wrapping the C++ API.
Right now it will probably be slower than cpickle.