I added a couple more tests to the benchmark, here are the results:
JSON
3.57209396362
Protocol Buffer (fast-python-pb)
0.325706005096
Protocol Buffer (native)
4.83730196953
Protocol Buffer (lwpb)
0.32919216156
cPickle
0.837985038757
As you can see, lwpb and fast-python-pb are neck and neck. And I should point out that lwpb isn't using C++ codegen at all, just the compiled schema in the .proto file. Of course, if completeness of implementation was the critical thing, you'd probably want to stay closer to google's official implementation. There's a lot of the google implementation that I never use though, like the RPC stuff.Also notable that both lwpb and fast-python-pb outperform cPickle by almost 3x. It would be interesting to know why a portable, cross-language serialization format beats out the language-specific one.
Here's a fork with the patched benchmark code: https://github.com/acg/fast-python-pb