跳到主要内容
版本:0.17

Python 基准性能报告

生成于 2026-04-14 14:53:18

如何生成本报告​

cd benchmarks/python
./run.sh

硬件与操作系统信息​

键值
操作系统Darwin 24.6.0
机器架构arm64
处理器arm
Python3.10.8
CPU 核心数(物理)12
CPU 核心数(逻辑)12
总内存(GB)48.0
Python 实现CPython
基准平台macOS-15.7.2-arm64-arm-64bit

基准配置​

键值
warmup3
iterations15
repeat5
number1000
list_size5

基准图表​

所有图表均展示吞吐量(ops/sec);数值越高越好。

总吞吐量​

Throughput

Mediacontent​

Mediacontent

Mediacontentlist​

Mediacontentlist

Sample​

Sample

Samplelist​

Samplelist

Struct​

Struct

Structlist​

Structlist

基准结果​

延迟结果(纳秒)​

数据类型操作fory (ns)pickle (ns)protobuf (ns)最快
StructSerialize431.3963.9604.3fory
StructDeserialize476.6925.1804.8fory
SampleSerialize4966.312725.14396.0protobuf
SampleDeserialize4362.96409.26620.1fory
MediaContentSerialize1213.14263.13173.7fory
MediaContentDeserialize1620.74625.84306.3fory
StructListSerialize1072.02798.63759.0fory
StructListDeserialize1334.72756.73963.5fory
SampleListSerialize23866.833484.518711.7protobuf
SampleListDeserialize17347.522999.036077.1fory
MediaContentListSerialize3526.911258.117670.6fory
MediaContentListDeserialize6241.110209.521440.7fory

吞吐结果(ops/sec)​

数据类型操作fory TPSpickle TPSprotobuf TPS最快
StructSerialize2,318,5981,037,4291,654,700fory
StructDeserialize2,098,3911,081,0031,242,545fory
SampleSerialize201,35878,585227,479protobuf
SampleDeserialize229,204156,026151,056fory
MediaContentSerialize824,338234,569315,087fory
MediaContentDeserialize616,999216,177232,216fory
StructListSerialize932,803357,322266,029fory
StructListDeserialize749,212362,753252,301fory
SampleListSerialize41,89929,86553,442protobuf
SampleListDeserialize57,64543,48027,718fory
MediaContentListSerialize283,53588,82556,591fory
MediaContentListDeserialize160,22797,94846,640fory

序列化数据大小(字节)​

数据类型forypickleprotobuf
Struct5812661
Sample4461176375
MediaContent391624301
StructList184420315
SampleList198035461890
MediaContentList166514151520