5 ms·
One important thing to consider with JSON is that a lot of people really, really care about JSON performance -- optimsing parsing in assembler, and rewriting in
by CJefferson 4y ago
One important thing to consider with JSON is that a lot of people really, really care about JSON performance -- optimsing parsing in assembler, and rewriting internal datastructures just to make serialising + deserialising JSON faster.
I'm sure given two implementations of equal quality protobuf would easily outperform JSON, but I can also believe the JSON implementation in (for example) v8 is very, very hard to beat.
- jeffbee 4y agohttps://github.com/protobufjs/protobuf.js#performance https://github.com/protobufjs/protobuf.js#performance
- CJefferson 4y agoI just benchmarked it on my computer -- the protobuf is twice as fast (well, 1.8x), which is good, but I don't think I'd use that as a basis for choosing the technology I use. Of course, I might use protobuf because I prefer it in my code to JSON, and it certainly is faster (if only twice).