2 ms·
I don't really get your attitude here. In particular, I'm not disagreeing that JSON parsers in the browser could be currently faster than protocol buffers. I'
by dekhn 4y ago
I don't really get your attitude here. In particular, I'm not disagreeing that JSON parsers in the browser could be currently faster than protocol buffers.
I'm saying that computer science and hardware dictate that protocol buffers are faster for a wide range of reasons. That part's not in question- smaller data encodings have better cache use, and require far fewer dictionary (hash table) lookups at parse time, as well as far length work parsing strings. If you want to argue against my point there I don't know what to say.
If it was a priority to write a blindingly fast protocol buffer parser in JS, it's almost certain than an expert could write a faster one than a similar JSON parser.
- lucideer 4y ago> I don't really get your attitude here My attitude here is that I made a specific observation: JSON is likely to be faster or at least negligibly slower in browsers in practice. Everyone is replying either with theoretical speed comparisons or server-to-server non-JavaScript benchmarks, which don't seem relevant to my very specific observation I made up top...
- yencabulator 4y agoIf you had bothered to benchmark it, you'd have realized that lots of protobuf libraries are actually surprisingly slow.