3 ms·
How much slower is JSON serialization than XML serialization?
by fastball 5y ago
How much slower is JSON serialization than XML serialization?
- goodpoint 5y agoRoughly in the same order of magnitude, depending on the implementation. Light-years away from zero-copy serialization formats. See https://en.wikipedia.org/wiki/Comparison_of_data-serialization_formats https://en.wikipedia.org/wiki/Comparison_of_data-serializati... Random example: https://google.github.io/flatbuffers/md__benchmarks.html https://google.github.io/flatbuffers/md__benchmarks.html Speed is not everything: being able to self-describe data structures (without the data) enables generation of parsers, documentation and tests. Streaming support also matters.
- deathanatos 5y agoIt's not. The grammar for JSON is vastly simpler than XML. (I'm certain one can find a slow JSON serializer out performed by a fast XML serializer, but that's not the point.)