跳到主要内容
版本:0.16

Fory Swift 基准

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

硬件与运行时信息

时间戳2026-03-10T06:25:16Z
操作系统Version 15.7.2 (Build 24G325)
主机macbook-pro.local
CPU 核心数(逻辑)12
内存(GB)48.00
每个用例持续时间(秒)3

吞吐结果

数据类型操作Fory TPSProtobuf TPSMsgpack TPS最快
StructSerialize9,727,9506,572,406141,248fory (1.48x)
StructDeserialize11,889,5708,584,51099,792fory (1.39x)
SampleSerialize3,496,3051,281,98317,188fory (2.73x)
SampleDeserialize1,045,018765,70612,767fory (1.36x)
MediaContentSerialize1,425,354678,54229,048fory (2.10x)
MediaContentDeserialize614,447478,29812,711fory (1.28x)
StructListSerialize3,307,9621,028,21024,781fory (3.22x)
StructListDeserialize2,788,200708,5968,160fory (3.93x)
SampleListSerialize715,734205,3803,361fory (3.48x)
SampleListDeserialize199,317133,4251,498fory (1.49x)
MediaContentListSerialize364,097103,7215,538fory (3.51x)
MediaContentListDeserialize103,42186,3311,529fory (1.20x)

序列化大小(字节)

数据类型ForyProtobufMsgpack
MediaContent365301524
MediaContentList153515202639
Sample446375737
SampleList198018903698
Struct586165
StructList184315338