Skip to main content
Version: dev

Rust Benchmark Performance Report

Generated on 2026-03-20 18:40:46

How to Generate This Report

cd benchmarks/rust
cargo bench --bench serialization_bench 2>&1 | tee results/cargo_bench.log
cargo run --release --bin fory_profiler -- --print-all-serialized-sizes | tee results/serialized_sizes.txt
python benchmark_report.py --log-file results/cargo_bench.log --size-file results/serialized_sizes.txt --output-dir results

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-03-20T18:40:44

Benchmark Plots

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

Throughput

Throughput

MediaContent

MediaContent

MediaContentList

MediaContentList

Sample

Sample

SampleList

SampleList

Struct

Struct

StructList

StructList

Benchmark Results

Timing Results (nanoseconds)

DatatypeOperationfory (ns)protobuf (ns)Fastest
StructSerialize69.676.8fory
StructDeserialize27.070.4fory
SampleSerialize148.5584.3fory
SampleDeserialize350.9983.1fory
MediaContentSerialize277.8553.2fory
MediaContentDeserialize472.3706.4fory
StructListSerialize170.4385.4fory
StructListDeserialize96.8294.7fory
SampleListSerialize356.23155.7fory
SampleListDeserialize1644.14361.0fory
MediaContentListSerialize657.42844.0fory
MediaContentListDeserialize2397.73696.6fory

Throughput Results (ops/sec)

DatatypeOperationfory TPSprotobuf TPSFastest
StructSerialize14,366,16513,022,359fory
StructDeserialize37,065,86614,202,528fory
SampleSerialize6,734,9141,711,537fory
SampleDeserialize2,849,4091,017,201fory
MediaContentSerialize3,600,2301,807,664fory
MediaContentDeserialize2,117,4331,415,689fory
StructListSerialize5,866,8232,595,043fory
StructListDeserialize10,330,1523,393,051fory
SampleListSerialize2,807,333316,887fory
SampleListDeserialize608,236229,305fory
MediaContentListSerialize1,521,098351,617fory
MediaContentListDeserialize417,066270,519fory

Serialized Data Sizes (bytes)

Datatypeforyprotobuf
Struct5861
Sample446375
MediaContent365301
StructList184315
SampleList19801890
MediaContentList15351520