speed comparison with protocol buffers

31 views
Skip to first unread message

Aaron Bohannon

unread,
Jul 1, 2013, 12:01:48 PM7/1/13
to msg...@googlegroups.com

Hi, I just want to observe that the performance comparison with protocol buffers appears to have been done incorrectly.

The speed test seems to be based on this proto message definition:


message Test {
    required int32 id      = 1;
    required uint32 width  = 2;
    required uint32 height = 3;
    required string data   = 4;
}

However, int32/uint32 are var-int encoded types. Var-int encoding trades speed for size. Msgpack appears to have only fixed-length encodings for primitive type, but protocol buffers have both. To do the comparison properly, you should be basing the test on the fixed-length encodings for protocol buffers:


message Test {
    required sfixed32 id    = 1;
    required fixed32 width  = 2;
    required fixed32 height = 3;
    required string data    = 4;
}

Hope this helps.

…Aaron

Reply all
Reply to author
Forward
0 new messages