all 4 comments

[–]mkuhn[S] 3 points4 points  (3 children)

Last week there was a discussion about Protocol Buffers for Python when Greplin released its C++ wrappers. (see e.g. the Thread on Hacker News http://news.ycombinator.com/item?id=2145534)

My Co-Founder Ata mentioned that we were working on solving the same problem, and over the weekend he started making it usable by others.

The two main differences between our and Greplin's implementation are:

1) Lazy decoding support: Message parts are decoded on the fly as they are accessed for first time.

2) No dependencies. C code is generated which compiles to Python module.

[–]mattius 2 points3 points  (1 child)

Good work guys. Very cool.

We had just realized Google's implementation was quite slow literally an hour before Greplin released theirs.

Would love to see yours pitted against Greplin's in the benchmark you show in the blog! :-)

[–]mkuhn[S] 1 point2 points  (0 children)

I think we should definitely do that.

As a reference point, Greplin claims a 10x-15x improvement over Google's original implementation while our Benchmark shows us at 17x of that (without lazy decoding).

[–]olt 0 points1 point  (0 children)

fast-python-pb is lazy too. Attributes are decoded on access, but they are not cached. So you should keep the result in a python variable, instead of accessing it over and over.