Requirements: Recently we saw the release of MessagePack, a serialization framework, which is an efficient binary serialization format. It allows you to exchange data between multiple languages, such as JSON. But it's faster and smaller. Small integers are encoded as a single byte, and a typical short string requires only one extra byte in addition to the string itself.
MessagePack is supported by over 50 programming languages and environments. Website:The hyperlink login is visible.
In short: it's a tool for serializing and deserializing objects, just like Newtonsoft.Json, except that it's a tool for serializing and deserializing objectsThe performance, speed, and usage are much higher than JSON serialization, and the disadvantage is poor readability (it cannot be intuitively viewed as JSON content).。
MessagePack for C #(.NET, .NET Core, Unity, Xamarin):The hyperlink login is visible.
Extremely fast MessagePack serializer for C#. It is 10x faster than MsgPack-Cli and outperforms other C# serializers. MessagePack for C# also has built-in support for LZ4 compression - an extremely fast compression algorithm. Performance matters, especially in applications such as gaming, distributed computing, microservices, or data caching.
The performance comparison chart is as follows:
Benchmark with BenchmarkDotNet for the code:
The referenced packages are as follows:
The test results are as follows:
MessagePack is indeed faster than protobuf-net serialization, deserialization, since deserialization requires converting hexadecimal to byte[] in, serialization should be faster.
(End)
|