Why is binary serialization considered faster than xml serialization?
Consider serializing double for example:
binary serialization: writing 8 bytes from memory address to the stream
binary deserialization: reading same 8 bytes
xml serialization: writing tag, converting to text, writing closing tag - nearly thrice the I/O and 1000x more CPU utilization
xml deserialization: tag reading/validation, reading string parsing it to number, reading/validation of closing tag. little more overhead for I/O and some more for CPU