Skip to main content
Version: dev

Fory Swift Benchmark

This benchmark compares serialization and deserialization throughput for Apache Fory, Protocol Buffers, and MessagePack in Swift.

Hardware and Runtime Info

KeyValue
Timestamp2026-03-10T06:25:16Z
OSVersion 15.7.2 (Build 24G325)
Hostmacbook-pro.local
CPU Cores (Logical)12
Memory (GB)48.00
Duration per case (s)3

Throughput Results

DatatypeOperationFory TPSProtobuf TPSMsgpack TPSFastest
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)

Serialized Size (bytes)

DatatypeForyProtobufMsgpack
MediaContent365301524
MediaContentList153515202639
Sample446375737
SampleList198018903698
Struct586165
StructList184315338