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

Enable Visual Studio to use more than 2GB of memory

Firefox and Chrome dark mode

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