All Projects → thekvs → Cpp Serializers

thekvs / Cpp Serializers

Benchmark comparing various data serialization libraries (thrift, protobuf etc.) for C++

Programming Languages

cpp
1120 projects

Projects that are alternatives of or similar to Cpp Serializers

javascript-serialization-benchmark
Comparison and benchmark of JavaScript serialization libraries (Protocol Buffer, Avro, BSON, etc.)
Stars: ✭ 54 (-89.87%)
Mutual labels:  serialization, protobuf, avro
Shineframe
高性能超轻量级C++开发库及服务器编程框架
Stars: ✭ 274 (-48.59%)
Mutual labels:  protobuf, serialization
Srpc
RPC based on C++ Workflow
Stars: ✭ 521 (-2.25%)
Mutual labels:  thrift, protobuf
Yarpc Go
A message passing platform for Go
Stars: ✭ 285 (-46.53%)
Mutual labels:  thrift, protobuf
nimpb
Protocol Buffers for Nim
Stars: ✭ 29 (-94.56%)
Mutual labels:  serialization, protobuf
AvroConvert
Apache Avro serializer for .NET
Stars: ✭ 44 (-91.74%)
Mutual labels:  serialization, avro
Ratatool
A tool for data sampling, data generation, and data diffing
Stars: ✭ 279 (-47.65%)
Mutual labels:  protobuf, avro
protobuf-d
Protocol Buffers Compiler Plugin and Support Library for D
Stars: ✭ 32 (-94%)
Mutual labels:  serialization, protobuf
Gosercomp
⚡️ Golang Serializer Benchmark Comparison
Stars: ✭ 300 (-43.71%)
Mutual labels:  thrift, protobuf
Messagepack Csharp
Extremely Fast MessagePack Serializer for C#(.NET, .NET Core, Unity, Xamarin). / msgpack.org[C#]
Stars: ✭ 3,668 (+588.18%)
Mutual labels:  msgpack, serialization
Msgpack.php
A pure PHP implementation of the MessagePack serialization format / msgpack.org[PHP]
Stars: ✭ 327 (-38.65%)
Mutual labels:  msgpack, serialization
sbp
Structured Bindings Pack - serialize C++ structs into MessagePack binary form
Stars: ✭ 16 (-97%)
Mutual labels:  serialization, msgpack
CppSerialization
Performance comparison of the most popular C++ serialization protocols such as Cap'n'Proto, FastBinaryEncoding, Flatbuffers, Protobuf, JSON
Stars: ✭ 89 (-83.3%)
Mutual labels:  serialization, protobuf
ocaml-pb-plugin
A protoc plugin for generating OCaml code from protobuf (.proto) files.
Stars: ✭ 18 (-96.62%)
Mutual labels:  serialization, protobuf
Protobuf
A pure Elixir implementation of Google Protobuf
Stars: ✭ 442 (-17.07%)
Mutual labels:  protobuf, serialization
Kotlinx.serialization
Kotlin multiplatform / multi-format serialization
Stars: ✭ 3,550 (+566.04%)
Mutual labels:  protobuf, serialization
protoc-plugin
A protoc compiler plugin for Clojure applications
Stars: ✭ 28 (-94.75%)
Mutual labels:  serialization, protobuf
graphql-binary
GraphQL binary protocol for smaller network traffic and parsing performance
Stars: ✭ 41 (-92.31%)
Mutual labels:  protobuf, msgpack
Flatbuffers
FlatBuffers: Memory Efficient Serialization Library
Stars: ✭ 17,180 (+3123.26%)
Mutual labels:  protobuf, serialization
Ceras
Universal binary serializer for a wide variety of scenarios https://discord.gg/FGaCX4c
Stars: ✭ 374 (-29.83%)
Mutual labels:  msgpack, serialization

About

Compare various data serialization libraries for C++.

Build

This project does not have any external serialization libraries dependencies. All (boost, thrift etc.) needed libraries are downloaded and built automatically, but you need enough free disk space (approx. 2.3G) to build all components. To build this project you need a compiler that supports C++14 features. Project was tested with Clang and GCC compilers.

  1. git clone https://github.com/thekvs/cpp-serializers.git
  2. cd cpp-serializers
  3. mkdir build
  4. cd build
  5. cmake -DCMAKE_BUILD_TYPE=Release ..
  6. cmake --build .

Usage

$ ./benchmark -h
Benchmark various C++ serializers
Usage:
  benchmark [OPTION...]

  -h, --help             show this help and exit
  -l, --list             show list of supported serializers
  -c, --csv              output in CSV format
  -i, --iterations arg   number of serialize/deserialize iterations
  -s, --serializers arg  comma separated list of serializers to benchmark
  • Benchmark all serializers, run each serializer 100000 times:
$ ./benchmark -i 100000
  • Benchmark only protobuf serializer, run it 100000 times:
$ ./benchmark -i 100000 -s protobuf
  • Benchmark protobuf and cereal serializers only, run each of them 100000 times:
$ ./benchmark -i 100000 -s protobuf,cereal

Results

Following results were obtained running 1000000 serialize-deserialize operations 50 times and then averaging results on a typical desktop computer with Intel Core i7 processor running Ubuntu 16.04. Exact versions of libraries used are:

  • thrift 0.12.0
  • protobuf 3.7.0
  • boost 1.69.0
  • msgpack 3.1.1
  • cereal 1.2.2
  • avro 1.8.2
  • capnproto 0.7.0
  • flatbuffers 1.10.0
  • YAS 7.0.2
serializer object's size avg. total time
thrift-binary 17017 1190.22
thrift-compact 13378 3474.32
protobuf 16116 2312.78
boost 17470 1195.04
msgpack 13402 2560.6
cereal 17416 1052.46
avro 16384 4488.18
yas 17416 302.7
yas-compact 13321 2063.34

Size

Size

Time

Time

For capnproto and flatbuffers since they already store data in a "serialized" form and serialization basically means getting pointer to the internal storage, we measure full build/serialize/deserialize cycle. In the case of other libraries we measure serialize/deserialize cycle of the already built data structure.

serializer object's size avg. total time
capnproto 17768 400.98
flatbuffers 17632 491.5

Time

Size measured in bytes, time measured in milliseconds.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].