Fastest Serializer for .NET and C#
I just ran a benchmark today. DataContractSerializer runs pretty fast, but The DataContractJsonSerializer can serialize faster. Note however that the DataContractSerializer can deserialize faster than the Json.
Deserialization times:
Binary: 198 ms
DC: 20 ms
Json: 74 ms
Serialization times:
Binary: 191 ms
DC: 0.3 ms
Json: 0.2 ms
When the size of data increases, Binary slows down faster than other techniques. Also, the size of the data is significantly smaller for Json and DC.
Deserialization times:
Binary: 198 ms
DC: 20 ms
Json: 74 ms
Serialization times:
Binary: 191 ms
DC: 0.3 ms
Json: 0.2 ms
When the size of data increases, Binary slows down faster than other techniques. Also, the size of the data is significantly smaller for Json and DC.
Comments
Post a Comment