Skip to content
A benchmark of Flatbuffers / Protobuf / Raw struct for C++, designed to run on Linux
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.vscode
cmake
flatbuffer
protobuf
raw
.gitignore
CMakeLists.txt
LICENSE
README.md
bench.h
client-pb.cpp
client-raw.cpp
config.h
runAll.sh
server-pb.cpp
server-raw.cpp

README.md

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
You can’t perform that action at this time.