If you are able to use the other "P" (Perl) instead of Python or PHP,
http://code.google.com/p/protobuf-perlxs will give performance
comparable to PHP JSON, I would bet.

-dave

On Mar 20, 11:59 am, dvirsky <dvir...@gmail.com> wrote:
> Thanks,
> It seems as though the serialization is the slowest part, as i would
> expect.
> My earlier test was composing one message and serializing it over and
> over again.
>
> Just composing the message over and over again is much faster - about
> 10 times faster.
>
> Anyway, I think I'll pass on protobuf for this project, although it
> looks very cool and would definitely be my choice if both ends were
> cpp.
>
> On Mar 20, 8:35 pm, Kenton Varda <ken...@google.com> wrote:
>
> > The Python implementation is pretty slow right now.  I'm not familiar with
> > the PHP implementation so couldn't say exactly why it is faster, but it's
> > not terribly surprising.
> > Petar is working on making the Python implementation use native C++ code for
> > a lot of operations, which should make it much faster.
>
> > On Fri, Mar 20, 2009 at 6:02 AM, dvirsky <dvir...@gmail.com> wrote:
>
> > > Hi
> > > I'm considering using protobuf for a client-server project where the
> > > client is c++, and the server is php or python running on apache.
>
> > > I did a comparison of the unofficial and incomplete php library of
> > > protobuf, and the official python implementation.
> > > I expected them to be pretty much the same, perhaps with the python
> > > version being faster. I tested only serialization of very long
> > > messages (4-8kB), since this is what the server will do mostly.
>
> > > the results were that the php version is roughly 10 times faster than
> > > the python version (which was compiled optimized for speed). On my
> > > test, php managed to serialize about 150 messages per second, and
> > > python about 15. running with psyco i got it up to 25 but it's still
> > > very slow.
>
> > > Is this reasonable? could I be doing something wrong? It just doesn't
> > > make sense.
>
> > > Both, btw, compared badly to serializing a similar message with the
> > > PHP JSON library, which managed to do roughly 1500 serializations per
> > > second. Which I would expect, as it's compiled into PHP and not
> > > native.
--~--~---------~--~----~------------~-------~--~----~
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