Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!
Summary
-
Protobuf is best for message serialization. Some companies (e.g., Google) also use it extensively for disk serialization.
-
FlatBuffers has better CPU performance.
-
Apache Parquet is the most popular binary serialization format for data frames.
-
For text serialization format, please refer to Serialization and deserialization in Python .
Protobuf vs FlatBuffers
Flatbuffers are mmap-able and don't have any parsing overhead compared to protos. Large protos not only have CPU overhead but cause a memory usage spike when proto is parsed during the resource loading phase. The memory usage spike can lead to more page faults and increased end user latency. Flatbuffers have none of these disadvantages.