Skip to main content
Version: dev

Fory Swift Benchmark

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

Throughput Plot

Throughput

Hardware and Runtime Info

KeyValue
Timestamp2026-05-08T09:05:32Z
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 TPSJSON TPSFastest
NumericStructSerialize9,435,6236,175,939408,960fory (1.53x)
NumericStructDeserialize11,037,2256,842,676328,302fory (1.61x)
SampleSerialize3,596,8351,257,10079,781fory (2.86x)
SampleDeserialize982,255733,58841,274fory (1.34x)
MediaContentSerialize1,561,376609,89698,677fory (2.56x)
MediaContentDeserialize523,836395,20270,528fory (1.33x)
NumericStructListSerialize2,910,846918,36382,965fory (3.17x)
NumericStructListDeserialize2,436,636701,65669,353fory (3.47x)
SampleListSerialize694,557202,04016,679fory (3.44x)
SampleListDeserialize187,109131,9478,236fory (1.42x)
MediaContentListSerialize348,23898,00718,698fory (3.55x)
MediaContentListDeserialize104,99074,42216,298fory (1.41x)

Serialized Size (bytes)

DatatypeForyProtobufJSON
NumericStruct7893159
Sample445375696
MediaContent362301608
NumericStructList255475816
SampleList197818903501
MediaContentList153115203067