4 ms·
XML is significantly more complicated and creates a tree structure that doesn't map 1:1 to common programming strings, arrays, dictionaries and numbers. It cre
by mahyarm 10y ago
XML is significantly more complicated and creates a tree structure that doesn't map 1:1 to common programming strings, arrays, dictionaries and numbers. It creates nodes with attributes in a tree structure with namespaces and whole bunch more. The consumer parsing code is significantly more complicated too.
YAML is missing things such as quote marks so you have to do things such as type inference to determine what an item is, which decreases speed.
I don't know the specifics more than that, but just do serialization benchmarks and you'll see it pretty quickly.