Remix.run Logo
blanched 5 hours ago

That's what the person you replied to is talking about, and they're right. Putting aside the final byte size (where protobuf also wins), protobuf is faster at both encoding and decoding than json. There are numerous benchmarks you can find that show this.

The advantages of json are not related to performance.

someothherguyy an hour ago | parent [-]

doesn't seem universally true, https://github.com/protobufjs/protobuf.js/issues/2114#issue-...

esrauch 31 minutes ago | parent [-]

If you're writing JS you cannot beat JSON.parse, because you're running the most optimized C++ implementation of JSON which will outcompete any decoder written JS itself.

Which is not a very generalizable situation.