4 ms·
Proto encoding makes the unfortunate choice of more-bit variable-length numbers which are hard to decode. JavaScript engines and browser all have very well opt
by romed 8y ago
Proto encoding makes the unfortunate choice of more-bit variable-length numbers which are hard to decode. JavaScript engines and browser all have very well optimized decoders for the unary length-prefixed variable-length numbers (i.e. UTF-8). So you can imagine how an encoding very much like proto but with the proper style of varints can be faster.
Generated code size is a huge problem of all protobuf-supporting languages, not just js. Code size issues on Android have constrained development of the official (google) protobuf libraries in various ways over the years.