4 ms·
Human-readability means low density: ASCII only uses 7 bit of 8, and most characters, like letters or digits, use only 6. Nobody in their sane mind would `eval
by nine_k 11y ago
Human-readability means low density: ASCII only uses 7 bit of 8, and most characters, like letters or digits, use only 6.
Nobody in their sane mind would `eval()` a JSON received from network, so parsing is required in any case, JS or not. A combination of lists and maps (maps being just a special-form list of pairs) can be represented in a much more compact way, especially numbers. Thrift and Cap'n Proto are definitely more compact and as fast, or faster, to parse.
I still suspect that in many cases, HTTP headers can be comparable to the message in size. A high-efficiency protocol would create a connection and avoid re-sending this information with every request — but good luck taking it through certain corporate firewalls.