Skip to content

C++ — Benchmark Results

Generated: 2026-07-11T11:21:21.424033

Published local snapshot (not regenerated by GitHub Actions). Numbers may differ if you re-run benchmarks on another machine.

Serializer inventory and caveats: C++ overview. Methods: Analysis Methodology. Metric definitions & importance tiers: Metrics catalog.

Pivot tables

Multi-way leaderboards emphasize high-importance metrics (configurable via metrics.multi_way in master config). Harness modes (CSV StringOrStream): bytes mode = in-memory buffer API; stream mode = write/read through a stream-like path. These names are not payload sizes. In each table, rows are sorted by serializer name; bold marks the semantic best value in that column (lowest time; highest ops/s). Ties are all bolded. Latency tables are in microseconds (µs). Batch fixtures show as Type · N instances (from DataTypeInstanceCount; e.g. Message · 100 instances).

Summary

Default multi-serializer view shows high-importance metrics only (METRICS.md). Rows are sorted by serializer name. Bold marks the semantic best value in each column (lowest latency / size; highest ops/s). Pairwise / version A/B reports use the full metric set. Latency cells are µs (analysis storage remains ns).

serializer Median total (µs) Median ser (µs) Median deser (µs) Ops/s (from mean) Median size (B) Samples Fidelity
arduinojson:7.2.1 1,950 103 1,840 0.0619M 17.6K 1748 1.00
avro:binary-1.11 20.6 8.81 11.8 1.32M 9.01K 1712 1.00
avro_c:avro-c 124 55.5 68.2 0.309M 9.01K 1780 1.00
bitsery:5.2.4 12.2 3.88 8.32 2.05M 9.75K 1757 1.00
capnproto:1.0.x 20.8 5.95 14.8 1.11M 18.3K 1723 1.00
cereal:1.3.2 32.2 13.3 18.7 0.824M 14.2K 1793 1.00
cista:0.15 28.4 3.76 24.6 1.12M 15.5K 1784 1.00
custom_binary:harness 31.3 19.7 11.6 0.934M 11.7K 1694 1.00
flatbuffers:flatbuffers 20.5 0.415 20 1.32M 10.4K 1727 1.00
flexbuffers:flatbuffers-flex 163 53.1 110 0.172M 17.3K 1795 1.00
jsoncons_bson:0.177.0 503 91.6 412 0.0536M 20.3K 1848 1.00
jsoncons_cbor:0.177.0 476 56.9 418 0.0572M 13.6K 1792 1.00
jsoncons_msgpack:0.177.0 456 53.9 402 0.0586M 13.5K 1815 1.00
msgpack:msgpack-cxx 147 19.8 127 0.207M 13.5K 1759 1.00
nlohmann_bson:3.11.3 339 85.2 254 0.121M 20.3K 1760 1.00
nlohmann_cbor:3.11.3 224 46.8 177 0.139M 13.6K 1758 1.00
nlohmann_json:3.11.3 290 73.8 216 0.103M 19.7K 1750 1.00
nlohmann_msgpack:3.11.3 231 46.4 184 0.135M 13.5K 1753 1.00
nlohmann_ubjson:3.11.3 250 44.9 205 0.122M 15.6K 1746 1.00
protobuf:wire-v2 51.9 31.9 20 0.753M 10.4K 1775 1.00
rapidjson:1.1.0 516 102 414 0.068M 19.7K 1795 1.00
simdjson:3.10.1 251 4.71 246 0.121M 19.7K 1762 1.00
thrift:TBinaryProtocol 21.7 11 10.7 1.1M 13.6K 1718 1.00
yas:7.x 12.2 5.06 7.04 1.64M 14.2K 1702 1.00
yyjson:0.10.0 278 22 256 0.112M 19.7K 1800 1.00
zpp_bits:4.4.25 16.2 8.43 7.74 1.78M 11.7K 1716 1.00

Total Time

serializer bytes mode/mean bytes mode/median stream mode/mean stream mode/median
arduinojson:7.2.1 4.02 3.97 5.78 5.81
avro:binary-1.11 0.187 0.187 0.202 0.202
avro_c:avro-c 0.713 0.711 0.725 0.721
bitsery:5.2.4 0.0888 0.088 0.102 0.102
capnproto:1.0.x 0.214 0.214 0.29 0.29
cereal:1.3.2 0.457 0.449 0.282 0.277
cista:0.15 0.179 0.178 0.196 0.192
custom_binary:harness 0.249 0.248 0.26 0.257
flatbuffers:flatbuffers 0.184 0.18 0.194 0.192
flexbuffers:flatbuffers-flex 1.75 1.74 1.77 1.77
jsoncons_bson:0.177.0 4.76 4.78 5.01 4.99
jsoncons_cbor:0.177.0 4.6 4.59 4.8 4.77
jsoncons_msgpack:0.177.0 4.64 4.56 4.71 4.69
msgpack:msgpack-cxx 1.43 1.42 1.5 1.51
nlohmann_bson:3.11.3 1.91 1.91 2.08 2.04
nlohmann_cbor:3.11.3 1.93 1.91 2.15 2.14
nlohmann_json:3.11.3 2.23 2.23 3.1 3.09
nlohmann_msgpack:3.11.3 2.07 2.07 2.13 2.09
nlohmann_ubjson:3.11.3 2.19 2.19 2.45 2.46
protobuf:wire-v2 0.268 0.271 0.281 0.283
rapidjson:1.1.0 2.86 2.8 5.51 5.52
simdjson:3.10.1 2.37 2.38 2.32 2.32
thrift:TBinaryProtocol 0.231 0.228 0.256 0.249
yas:7.x 0.19 0.188 0.2 0.2
yyjson:0.10.0 2.6 2.56 2.48 2.45
zpp_bits:4.4.25 0.17 0.161 0.173 0.172

Ops/Sec

serializer Document · 1 instance Document · 100 instances Event · 1 instance Event · 100 instances Message · 1 instance Message · 100 instances Strings · 1 instance Strings · 100 instances Telemetry · 1 instance Telemetry · 100 instances
arduinojson:7.2.1 0.091M 0.23K 0.15M 0.34K 0.25M 2.2K 0.11M 0.097K 0.1M 0.98K
avro:binary-1.11 2.7M 30K 2.5M 38K 5.3M 160K 1.4M 11K 1.2M 19K
avro_c:avro-c 0.37M 3.5K 0.55M 4.8K 1.4M 14K 0.22M 2.1K 0.53M 5K
bitsery:5.2.4 2.6M 50K 2.6M 49K 11M 250K 1.4M 16K 3.1M 68K
capnproto:1.0.x 1.9M 22K 1.8M 26K 4.7M 270K 1.2M 12K 2.2M 32K
cereal:1.3.2 0.89M 12K 1.2M 17K 2.2M 56K 0.58M 6.2K 1.6M 29K
cista:0.15 1.4M 16K 1.9M 22K 5.6M 74K 0.84M 8.7K 1.5M 22K
custom_binary:harness 1.2M 15K 1.9M 26K 4M 58K 1.1M 9.3K 1.1M 12K
flatbuffers:flatbuffers 1.6M 18K 2.1M 25K 5.4M 100K 2M 18K 2.1M 24K
flexbuffers:flatbuffers-flex 0.16M 1.7K 0.28M 3K 0.57M 6.8K 0.31M 3K 0.39M 4.4K
jsoncons_bson:0.177.0 0.066M 0.75K 0.11M 1.3K 0.21M 2.5K 0.077M 0.81K 0.071M 0.78K
jsoncons_cbor:0.177.0 0.069M 0.76K 0.12M 1.3K 0.22M 2.5K 0.091M 0.95K 0.08M 0.84K
jsoncons_msgpack:0.177.0 0.072M 0.79K 0.12M 1.4K 0.22M 2.4K 0.096M 0.97K 0.08M 0.85K
msgpack:msgpack-cxx 0.2M 2K 0.37M 3.6K 0.7M 7.2K 0.35M 3.1K 0.47M 4.8K
nlohmann_bson:3.11.3 0.14M 1K 0.27M 1.8K 0.52M 4.3K 0.15M 1.2K 0.21M 1.7K
nlohmann_cbor:3.11.3 0.15M 1.3K 0.27M 2.5K 0.52M 5.4K 0.24M 2K 0.29M 3.2K
nlohmann_json:3.11.3 0.15M 1.5K 0.25M 2.7K 0.45M 4.9K 0.21M 2K 0.12M 1.2K
nlohmann_msgpack:3.11.3 0.14M 1.3K 0.24M 2.4K 0.48M 5.1K 0.22M 1.8K 0.29M 3.1K
nlohmann_ubjson:3.11.3 0.14M 1.3K 0.23M 2.3K 0.46M 5.1K 0.18M 1.6K 0.28M 3.1K
protobuf:wire-v2 0.74M 6.8K 1.1M 11K 3.7M 35K 1.1M 8.6K 0.91M 7.9K
rapidjson:1.1.0 0.1M 1.2K 0.19M 2K 0.35M 3.3K 0.15M 1.6K 0.084M 0.86K
simdjson:3.10.1 0.15M 1.5K 0.28M 2.9K 0.42M 5K 0.24M 2.3K 0.11M 1.2K
thrift:TBinaryProtocol 1.8M 21K 2.1M 31K 4.3M 66K 1.3M 13K 1.6M 23K
yas:7.x 2.9M 45K 3.1M 59K 5.3M 210K 1.7M 16K 3.3M 58K
yyjson:0.10.0 0.14M 1.4K 0.25M 2.6K 0.39M 4.8K 0.2M 1.9K 0.11M 0.98K
zpp_bits:4.4.25 2.7M 22K 3M 36K 5.9M 180K 1.5M 15K 4.6M 60K

Latency distributions

Each figure pairs mean bars (left: ser / deser mean µs, linear from 0) with split violins (right: full sample density, linear from 0). Top 5 serializers by mean total time per fixture (display only; tables list all). Provenance (fixture, CSV path, modes, n) is printed on each image.

Document · 1 instance

Document · 1 instance

Document · 100 instances

Document · 100 instances

Event · 1 instance

Event · 1 instance

Event · 100 instances

Event · 100 instances

Message · 1 instance

Message · 1 instance

Message · 100 instances

Message · 100 instances

Strings · 1 instance

Strings · 1 instance

Strings · 100 instances

Strings · 100 instances

Telemetry · 1 instance

Telemetry · 1 instance

Telemetry · 100 instances

Telemetry · 100 instances

Regenerate

Published snapshots are produced locally (not by GitHub Actions). After running benchmarks (each run creates a timestamped YYYY-MM-DD-HHMMSS.csv):

analyze-benchmarks              # all languages
analyze-benchmarks -l cpp   # this language only

That refreshes this language's results tables and latency distributions under docs/analysis/plots/violin/. The hub Benchmark Results is a static index and is not rewritten. Commit the updated results.md / plot paths as needed.

Run configuration (important)

Show host, seed, serializers, and source CSV

Key fields from the run sidecar (*.configs.json, or legacy *.environment.json). Full metric definitions: Metrics catalog. Optional blocks (dataset, serializers) appear only when captured.

  • Source CSV: ../logs/cpp/2026-07-11-112042.csv
  • run=2026-07-11-112042
  • language=cpp
  • os=Linux 6.8.0-124-generic
  • cpu=12th Gen Intel(R) Core(TM) i7-12800H (20 threads)
  • ram=31.0 GiB
  • runtimes: g++=g++ (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0, python=3.14.0, node=24.15.0
  • git=7c53353
  • seed=42
  • warmup_reps=1
  • serializers=26
  • metrics_profile=multi_way
  • Fixtures (config): message, document, telemetry, strings, event
  • Serializers (from CSV):
  • arduinojson @ 7.2.1
  • avro @ binary-1.11
  • avro_c @ avro-c
  • bitsery @ 5.2.4
  • capnproto @ 1.0.x
  • cereal @ 1.3.2
  • cista @ 0.15
  • custom_binary @ harness
  • flatbuffers @ flatbuffers
  • flexbuffers @ flatbuffers-flex
  • jsoncons_bson @ 0.177.0
  • jsoncons_cbor @ 0.177.0
  • jsoncons_msgpack @ 0.177.0
  • msgpack @ msgpack-cxx
  • nlohmann_bson @ 3.11.3
  • nlohmann_cbor @ 3.11.3
  • nlohmann_json @ 3.11.3
  • nlohmann_msgpack @ 3.11.3
  • nlohmann_ubjson @ 3.11.3
  • protobuf @ wire-v2
  • rapidjson @ 1.1.0
  • simdjson @ 3.10.1
  • thrift @ TBinaryProtocol
  • yas @ 7.x
  • yyjson @ 0.10.0
  • zpp_bits @ 4.4.25