| Name | Attribute | Description |
|---|---|---|
| MemoryPack | MemoryPackable | Zero encoding extreme performance binary serializer |
| MessagePack | MessagePackObject | Extremely fast MessagePack serializer |
| protobuf-net | ProtoContract | Contract based protocol buffers serializer |
| Json | High-performance, low-allocating, and standards-compliant JSON serializer |
Serializers produce varying byte sizes which impact performance and storage, thus speed is not universally the best measure for success. Benchmark results will vary on different systems and environments so conduct your own benchmarks to evaluate performance for your use case if warranted. Note that Memory Allocation refers to the serialize output byte size.
Environment: .NET SDK 9.0.1, Windows 11, i9-10900 CPU 2.80GHz
[1] Benchmarks when
de/serializing Person.
[2] Benchmarks when
de/serializing ComplexPerson.
[3] Benchmarks when de/serializing
an Office with
1000 Person children.
IHybridCacheSerializerFactoryimplementations yield serializers for types with the respective serializer attribute by default (e.g.,MemoryPackablefor MemoryPack). OverrideSupportsType<T>()to customize type support.