跳到主要内容
版本:0.16

C++ 基准性能报告

生成时间:2025-12-15 23:03:06

如何生成本报告

cd benchmarks/cpp_benchmark/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

硬件与系统信息

KeyValue
OSDarwin 24.6.0
Machinearm64
Processorarm
CPU Cores (Physical)12
CPU Cores (Logical)12
Total RAM (GB)48.0
Benchmark Date2025-12-15T23:02:49+08:00
CPU Cores (from benchmark)12

基准图表

Throughput

基准结果

耗时结果(纳秒)

DatatypeOperationFory (ns)Protobuf (ns)Faster
MediacontentSerialize443.51982.5Fory (4.5x)
MediacontentDeserialize1349.02525.2Fory (1.9x)
SampleSerialize235.4309.7Fory (1.3x)
SampleDeserialize1068.71397.0Fory (1.3x)
StructSerialize109.4170.0Fory (1.6x)
StructDeserialize129.1161.2Fory (1.2x)

吞吐结果(ops/sec)

DatatypeOperationFory TPSProtobuf TPSFaster
MediacontentSerialize2,254,915504,410Fory (4.5x)
MediacontentDeserialize741,303396,013Fory (1.9x)
SampleSerialize4,248,9733,229,102Fory (1.3x)
SampleDeserialize935,709715,837Fory (1.3x)
StructSerialize9,143,6185,881,005Fory (1.6x)
StructDeserialize7,746,7876,202,164Fory (1.2x)

序列化数据大小(字节)

DatatypeForyProtobuf
Struct3261
Sample384375