Skip to content

A benchmark of Flatbuffers / Protobuf / Raw struct for C++, designed to run on Linux

License

Notifications You must be signed in to change notification settings

winstonleedev/buffer-bench

Repository files navigation

buffer-bench

A benchmark of Flatbuffer / Protobuf / Raw struct for C++, designed to run on Linux

Updated Jun-2019 for use with latest versions of flatbuffer and protobuf

How to run

  • Install flatbuffers Must use a custom version. This version has code generation modified to avoid duplicate declarations with newer versions of GRPC.
  • Install grpc Must use a custom version. This version expose some private fields that flatbuffers need
  • Install protobuf Will be installed together with grpc above
  • Install evpp
  • Install zlib sudo apt-get install zlibc
  • Open in CLion
  • Sync CMake project
  • Press build
  • Run make in /flatbuffer
  • Run runAll.sh
  • Result will be written to result.txt

Sample result

=================================
FLATBUF bench start...
total bytes = 15898507595776707224
* 0.003065 create time
* 0.238328 receive time
* 0.002950 use
* 0.000782 free
* 0.245125 total time
=================================
PROTOBUF bench start...
total bytes = 0
* 0.000766 create time
* 0.244944 receive time
* 0.001007 use
* 0.000785 free
* 0.247503 total time
=================================
RAW bench start...
total bytes = 54377074000
* 0.001709 create time
* 0.002417 receive time
* 0.000813 use
* 0.000759 free
* 0.005699 total time

About

A benchmark of Flatbuffers / Protobuf / Raw struct for C++, designed to run on Linux

Resources

License

Stars

Watchers

Forks

Packages

No packages published