top | item 46118981

(no title)

tmikaeld | 2 months ago

So a potential 4-9% difference..

NOT worth it, especially if the whole infra is already using JSON.

discuss

order

bloppe|2 months ago

Per the post:

> This can sound like nothing, but considering that Protobuf has to be converted from binary to JSON - JavaScript code uses JSON as its object literal format - it is amazing that Protobuf managed to be faster than its counterpart.

Presumably the difference would be much larger for languages that can actually represent a statically-typed structure efficiently.

Also, the tradeoffs have changed since Protobuf was invented. Network bandwidth has gotten cheaper faster than CPU bandwidth has, so the en/de-coding speed is more important than the packet size in many situations. And if you don't use gzip, Protobuf is much faster (especially in non-JS languages, and especially if you use fixed-size integer types instead of variants).