跳到主要内容
版本:0.17

Fory Dart 基准

该基准用于比较 Apache Fory 和 Protocol Buffers 在 Dart 中的序列化与反序列化吞吐量。

硬件与运行时信息​

键值
时间戳2026-04-13T21:55:28.456625Z
操作系统Version 26.2 (Build 25C56)
主机Macbook-Air.local
CPU 核心数(逻辑)8
内存(GB)8.00
Dart3.10.4 (stable) (Tue Dec 9 00:01:55 2025 -0800) on "macos_arm64"
每个用例的采样次数5
每个用例的预热时长(秒)1.0
每个用例的持续时长(秒)1.5

吞吐结果​

Throughput

数据类型操作Fory TPSProtobuf TPS最快
StructSerialize3,989,4321,884,653fory (2.12x)
StructDeserialize5,828,1974,199,680fory (1.39x)
SampleSerialize1,649,722500,167fory (3.30x)
SampleDeserialize2,060,113785,109fory (2.62x)
MediaContentSerialize800,876391,235fory (2.05x)
MediaContentDeserialize1,315,115683,533fory (1.92x)
StructListSerialize1,456,396367,506fory (3.96x)
StructListDeserialize1,921,006645,958fory (2.97x)
SampleListSerialize411,14448,508fory (8.48x)
SampleListDeserialize464,273103,558fory (4.48x)
MediaContentListSerialize186,87077,029fory (2.43x)
MediaContentListDeserialize330,293128,215fory (2.58x)

序列化大小(字节)​

数据类型ForyProtobuf
Struct5861
Sample446377
MediaContent365307
StructList184315
SampleList19801900
MediaContentList15351550

各工作负载图表​

Struct​

Struct

Sample​

Sample

MediaContent​

MediaContent

StructList​

StructList

SampleList​

SampleList

MediaContentList​

MediaContentList