tree: 30a668794f2f309bfdbba813d563b04d86112c9d
  1. mediacontent.png
  2. mediacontentlist.png
  3. README.md
  4. sample.png
  5. samplelist.png
  6. struct.png
  7. structlist.png
  8. throughput.png
docs/benchmarks/cpp/README.md

C++ Benchmark Performance Report

Generated on 2026-04-29 21:16:35

How to Generate This Report

cd benchmarks/cpp/build
./fory_benchmark --benchmark_format=json --benchmark_out=benchmark_results.json
cd ..
python benchmark_report.py --json-file build/benchmark_results.json --output-dir report

Hardware & OS Info

KeyValue
OSDarwin 24.6.0
Machinearm64
Processorarm
CPU Cores (Physical)12
CPU Cores (Logical)12
Total RAM (GB)48.0
Benchmark Date2026-04-29T21:15:49+08:00
CPU Cores (from benchmark)12

Benchmark Plots

All class-level plots below show throughput (ops/sec).

Throughput

Throughput

Struct

Struct

Sample

Sample

Mediacontent

Mediacontent

Structlist

Structlist

Samplelist

Samplelist

Mediacontentlist

Mediacontentlist

Benchmark Results

Timing Results (nanoseconds)

DatatypeOperationfory (ns)protobuf (ns)msgpack (ns)Fastest
StructSerialize25.634.354.3fory
StructDeserialize23.125.5769.9fory
SampleSerialize68.496.6317.8fory
SampleDeserialize326.2662.52633.8fory
MediaContentSerialize119.5854.1292.7fory
MediaContentDeserialize391.21207.22809.7fory
StructListSerialize72.6421.4286.4fory
StructListDeserialize122.7364.13400.5fory
SampleListSerialize284.04898.11549.8fory
SampleListDeserialize1824.85047.413206.2fory
MediaContentListSerialize477.84788.91461.9fory
MediaContentListDeserialize2053.46561.813702.4fory

Throughput Results (ops/sec)

DatatypeOperationfory TPSprotobuf TPSmsgpack TPSFastest
StructSerialize39,028,13429,190,08318,400,879fory
StructDeserialize43,236,15939,162,7961,298,861fory
SampleSerialize14,612,19010,356,9473,146,384fory
SampleDeserialize3,065,8871,509,472379,673fory
MediaContentSerialize8,364,7681,170,8043,416,327fory
MediaContentDeserialize2,556,154828,370355,913fory
StructListSerialize13,768,8562,373,1153,491,609fory
StructListDeserialize8,149,8552,746,704294,075fory
SampleListSerialize3,521,702204,162645,233fory
SampleListDeserialize547,995198,12375,722fory
MediaContentListSerialize2,092,938208,817684,050fory
MediaContentListDeserialize486,993152,39872,980fory

Serialized Data Sizes (bytes)

Datatypeforyprotobufmsgpack
Struct586155
Sample446375530
MediaContent365301480
StructList184315289
SampleList198018902664
MediaContentList153515202421