File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ For each received reply clients send a new message. This gives us high load infi
4545| MessagePack | 172 bytes | 3.05m Msg/s |
4646| Protobuf-net | 86 bytes | 3.5m Msg/s |
4747| NetSerializer | 91 bytes | 4.1m Msg/s |
48- | Static Serializer | 72 bytes | 9.06m Msg/s |
48+ | Static Serializer | 72 bytes | 9.46m Msg/s |
4949
5050- Binary and data contract serialisation is too slow and too large.
5151- Json, considering its text based, shows more than expected performance.
@@ -56,12 +56,13 @@ For each received reply clients send a new message. This gives us high load infi
5656 the best performance when the type is well known and not subject to change.
5757
5858### Static Serializer
59- - It is a simple serialization where I index each property with a variant during serialization (flag bits => is default or not).
59+ - It is a simple serialization where I index each property with a variant during serialization (flag bits => skip serialization or not).
6060- i.e. 8 bit index bit 0 represend wether the first property is serialized or skipped (default values are skipped) bit 1-> second property etc.
6161- When deserializing this index is read and related properties is deserialized from the bytes in order.
6262- All primitives are zigzag encoded variants. This allows significant size rediction on small numbers.
6363- Strings are Utf8 encoded and has a header(variant) to indicate their lenght.
6464- Guid is encoded as two fixed int64
65+ - Collections Array/List/Dictionary are encoded with collection lenght and susequent repeated primitives.
6566
6667## Conclusion
6768I will use the custom serialization for the MessageEnvelope and internal message types.
You can’t perform that action at this time.
0 commit comments