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.

Comments

Popular posts from this blog

Tutorial: Using Google Cloud Storage from C# and .NET

Late 2008 Macbook only giving 1.5 gb/s speed with 6 gb/s Intel SSD?

The ridiculous interview experience