djkoloski/rust_serialization_benchmark

Benchmarks for rust serialization frameworks

Rust

1,019

204 commits

updated Oct 6, 2026

See the code

README

Rust serialization benchmark

The goal of these benchmarks is to provide thorough and complete benchmarks for various rust serialization frameworks.

Contributing

See CONTRIBUTING.md.

Maintainers

These benchmarks are maintained by a small group of volunteers. Special thanks to:

These benchmarks are a work in progress

These benchmarks are still being developed and pull requests to improve benchmarks are welcome.

Interactive site

Calculate the number of messages per second that can be sent/received with various rust serialization frameworks and compression libraries. Documentation

Format

All tests benchmark the following properties (time or size):

  • Serialize: serialize data into a buffer
  • Deserialize: deserializes a buffer into a normal rust object
  • Borrow: deserializes a buffer into a rust object that borrows string data from the input, with lifetime
  • Size: the size of the buffer when serialized
  • Zlib: the size of the buffer after zlib compression
  • Zstd: the size of the buffer after zstd compression
  • Zstd Time: the time taken to compress the serialized buffer with zstd

Zero-copy deserialization libraries have an additional set of benchmarks:

  • Access: accesses a buffer as structured data
  • Read: runs through a buffer and reads fields out of it
  • Update: updates a buffer as structured data

Some benchmark results may be italicized and followed by an asterisk. Mouse over these for more details on what situation was benchmarked. Some common terms for those variants:

  • (populate): copying or converting from the "regular" input type to the type generated by the library
  • (convert): copying or converting back from the library's generated type to the "regular" input type after deserializing

Other footnotes are located at the bottom of the page.

Last updated: 2026-10-05 23:16:23

Runtime info

rustc version

rustc 1.101.0-nightly (282215592 2026-10-04)
binary: rustc
commit-hash: 28221559263a3976766cf305940e80e30cf9ba8a
commit-date: 2026-10-04
host: x86_64-unknown-linux-gnu
release: 1.101.0-nightly
LLVM version: 23.1.3

CPU info

Architecture:                            x86_64
CPU op-mode(s):                          32-bit, 64-bit
Address sizes:                           48 bits physical, 48 bits virtual
Byte Order:                              Little Endian
CPU(s):                                  4
On-line CPU(s) list:                     0-3
Vendor ID:                               AuthenticAMD
Model name:                              AMD EPYC 7763 64-Core Processor
CPU family:                              25
Model:                                   1
Thread(s) per core:                      2
Core(s) per socket:                      2
Socket(s):                               1
Stepping:                                1
BogoMIPS:                                4890.85
Flags:                                   fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good nopl tsc_reliable nonstop_tsc cpuid extd_apicid aperfmperf tsc_known_freq pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 movbe popcnt aes xsave avx f16c rdrand hypervisor lahf_lm cmp_legacy svm cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw topoext vmmcall fsgsbase bmi1 avx2 smep bmi2 erms invpcid rdseed adx smap clflushopt clwb sha_ni xsaveopt xsavec xgetbv1 xsaves user_shstk clzero xsaveerptr rdpru arat npt nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold v_vmsave_vmload umip vaes vpclmulqdq rdpid fsrm
Virtualization:                          AMD-V
Hypervisor vendor:                       Microsoft
Virtualization type:                     full
L1d cache:                               64 KiB (2 instances)
L1i cache:                               64 KiB (2 instances)
L2 cache:                                1 MiB (2 instances)
L3 cache:                                32 MiB (1 instance)
NUMA node(s):                            1
NUMA node0 CPU(s):                       0-3
Vulnerability Gather data sampling:      Not affected
Vulnerability Ghostwrite:                Not affected
Vulnerability Indirect target selection: Not affected
Vulnerability Itlb multihit:             Not affected
Vulnerability L1tf:                      Not affected
Vulnerability Mds:                       Not affected
Vulnerability Meltdown:                  Not affected
Vulnerability Mmio stale data:           Not affected
Vulnerability Old microcode:             Not affected
Vulnerability Reg file data sampling:    Not affected
Vulnerability Retbleed:                  Not affected
Vulnerability Spec rstack overflow:      Vulnerable: Safe RET, no microcode
Vulnerability Spec store bypass:         Vulnerable
Vulnerability Spectre v1:                Mitigation; usercopy/swapgs barriers and __user pointer sanitization
Vulnerability Spectre v2:                Mitigation; Retpolines; STIBP disabled; RSB filling; PBRSB-eIBRS Not affected; BHI Not affected
Vulnerability Srbds:                     Not affected
Vulnerability Tsa:                       Vulnerable: No microcode
Vulnerability Tsx async abort:           Not affected
Vulnerability Vmscape:                   Not affected

log

This data set is composed of HTTP request logs that are small and contain many strings.

Raw data

For operations, time per iteration; for size, bytes. Lower is better.

Serialize / deserialize speed and size

CrateSerializeDeserializeBorrowSizeZlibZstdZstd Time
bilrost 0.1016.1474.26 µs* 424.95 µs*2.6719 ms889.80 µs8049553289412848493.7794 ms
bin-proto 0.12.94.6040 ms4.6570 ms†10457843731273115534.9875 ms
bitcode 0.6.9146.23 µs1.4627 ms62.383 µs7037102888262273222.4072 ms
borsh 1.8.1538.00 µs2.1794 ms†8857803622042862484.2598 ms
capnp:
capnp 0.27.2
614.45 µs 1.4923 ms*††1443216 1046865*513986 481681*426532 458024*6.2052 ms 5.4661 ms*
cbor:
cbor4ii 1.2.3
612.39 µs5.0893 ms3.5661 ms14078354034403235614.8618 ms
cbor:
ciborium 0.2.2
4.0821 ms11.941 ms†14078354034403235615.1075 ms
flatbuffers 25.12.191.0480 ms††12763684685393883814.8758 ms
flexbuffers 25.12.196.5149 ms7.1869 ms5.4444 ms18297567143186915418.7442 ms
json:
flexon 0.4.9
2.3589 ms3.6965 ms†18274614705603607275.9821 ms
json:
serde_json 1.0.151
3.6304 ms6.1963 ms†18274614705603607275.5363 ms
json:
simd-json 0.17.3
2.2017 ms4.8315 ms†18274614705603607275.5555 ms
messagepack:
msgpacker 0.7.1
348.64 µs2.5756 ms935.01 µs7649963152912642123.6109 ms
messagepack:
rmp-serde 1.3.1
1.4680 ms3.1443 ms1.5417 ms7849973253842776083.8686 ms
messagepack:
zerompk 0.8.0
349.11 µs2.2330 ms750.41 µs7849973253842776083.8326 ms
minicbor 2.3.0509.76 µs2.9704 ms1.4188 ms8178303326712840344.0535 ms
nanoserde 0.2.1262.19 µs2.1097 ms†10457843731273115534.2755 ms
postcard 1.1.3415.58 µs2.3385 ms628.78 µs7249533023992529683.2483 ms
protobuf:
buffa 0.9.2
905.35 µs* 2.3891 ms*3.0463 ms* 3.1747 ms*1.7834 ms8846283631303149594.4780 ms
protobuf:
prost 0.14.4
951.15 µs* 2.4626 ms*3.3833 ms* 3.4300 ms*†8846283631303149594.7934 ms
protobuf:
protobuf 3.7.2
1.3333 ms* 3.1605 ms*3.9048 ms* 3.9938 ms*†8846283631303149594.7646 ms
protobuf:
protobuf 4.36.2-release
1.7391 ms* 7.5239 ms*7.5075 ms* 3.1102 ms*†8846283631303149594.4944 ms
rkyv 0.8.18251.61 µs1.5571 ms* 1.9202 ms*†10114883935263259654.9764 ms
ron 0.12.212.534 ms27.073 ms25.085 ms16074594491583493245.6759 ms
savefile 0.20.5193.79 µs2.1189 ms†10458003731393115624.2223 ms
serde-zap 0.1.1193.14 µs2.1222 ms515.45 µs7412953039442564223.4173 ms
wincode 0.6.2191.41 µs1.8207 ms369.46 µs10457843731273115534.3746 ms

Zero-copy deserialization speed

CrateAccessReadUpdate
capnp:
capnp 0.27.2
64.650 ns*1.0451 ms* 151.39 µs*‡
flatbuffers 25.12.192.4940 ns* 2.0673 ms*49.918 µs* 2.0601 ms*‡
rkyv 0.8.181.2452 ns* 366.88 µs*10.456 µs* 377.82 µs*8.9682 µs*

Comparison

Relative to best. Higher is better.

Serialize / deserialize speed and size

CrateSerializeDeserializeBorrowSizeZlibZstdZstd Time
bilrost 0.1016.130.83%* 34.41%*54.74%7.01%87.42%87.80%79.80%63.69%
bin-proto 0.12.93.18%31.41%†67.29%77.41%72.96%48.26%
bitcode 0.6.9100.00%100.00%100.00%100.00%100.00%100.00%100.00%
borsh 1.8.127.18%67.11%†79.45%79.74%79.41%56.51%
capnp:
capnp 0.27.2
23.80% 9.80%*††48.76% 67.22%*56.19% 59.96%*53.30% 49.63%*38.79% 44.04%*
cbor:
cbor4ii 1.2.3
23.88%28.74%1.75%49.99%71.59%70.26%49.51%
cbor:
ciborium 0.2.2
3.58%12.25%†49.99%71.59%70.26%47.13%
flatbuffers 25.12.1913.95%††55.13%61.64%58.53%49.37%
flexbuffers 25.12.192.24%20.35%1.15%38.46%40.43%32.87%27.53%
json:
flexon 0.4.9
6.20%39.57%†38.51%61.38%63.02%40.24%
json:
serde_json 1.0.151
4.03%23.61%†38.51%61.38%63.02%43.48%
json:
simd-json 0.17.3
6.64%30.27%†38.51%61.38%63.02%43.33%
messagepack:
msgpacker 0.7.1
41.94%56.79%6.67%91.99%91.61%86.04%66.66%
messagepack:
rmp-serde 1.3.1
9.96%46.52%4.05%89.64%88.76%81.89%62.22%
messagepack:
zerompk 0.8.0
41.89%65.50%8.31%89.64%88.76%81.89%62.81%
minicbor 2.3.028.69%49.24%4.40%86.05%86.82%80.03%59.39%
nanoserde 0.2.155.77%69.33%†67.29%77.41%72.96%56.30%
postcard 1.1.335.19%62.55%9.92%97.07%95.51%89.86%74.11%
protobuf:
buffa 0.9.2
16.15%* 6.12%*48.02%* 46.07%*3.50%79.55%79.54%72.18%53.76%
protobuf:
prost 0.14.4
15.37%* 5.94%*43.23%* 42.64%*†79.55%79.54%72.18%50.22%
protobuf:
protobuf 3.7.2
10.97%* 4.63%*37.46%* 36.62%*†79.55%79.54%72.18%50.52%
protobuf:
protobuf 4.36.2-release
8.41%* 1.94%*19.48%* 47.03%*†79.55%79.54%72.18%53.56%
rkyv 0.8.1858.12%93.94%* 76.17%*†69.57%73.39%69.74%48.37%
ron 0.12.21.17%5.40%0.25%43.78%64.30%65.07%42.41%
savefile 0.20.575.46%69.03%†67.29%77.40%72.96%57.01%
serde-zap 0.1.175.71%68.92%12.10%94.93%95.03%88.65%70.44%
wincode 0.6.276.40%80.34%16.88%67.29%77.41%72.96%55.03%

Zero-copy deserialization speed

CrateAccessReadUpdate
capnp:
capnp 0.27.2
1.93%*1.00%* 6.91%*‡
flatbuffers 25.12.1949.93%* 0.00%*20.95%* 0.51%*‡
rkyv 0.8.18100.00%* 0.00%*100.00%* 2.77%*100.00%*

mesh

This data set is a single mesh. The mesh contains an array of triangles, each of which has three vertices and a normal vector.

Raw data

For operations, time per iteration; for size, bytes. Lower is better.

Serialize / deserialize speed and size

CrateSerializeDeserializeSizeZlibZstdZstd Time
bilrost 0.1016.16.8896 ms* 8.6870 ms*7.7424 ms86250056443961623157272.266 ms
bin-proto 0.12.98.7296 ms10.379 ms6000008537850053469088.6105 ms
bitcode 0.6.91.3867 ms699.82 µs60000065182295492184113.203 ms
borsh 1.8.15.7577 ms4.3384 ms6000004537849653468668.6725 ms
capnp:
capnp 0.27.2
9.5364 ms 19.341 ms*†14000088 10401737*7130367 7308001*6046182 7922110*80.914 ms 67.707 ms*
cbor:
cbor4ii 1.2.3
9.4013 ms44.877 ms131250167524114675743790.558 ms
cbor:
ciborium 0.2.2
67.789 ms112.54 ms131223247524660675912892.242 ms
flatbuffers 25.12.19470.18 µs†6000024537843453468788.5548 ms
flexbuffers 25.12.19100.57 ms77.696 ms266094241190104012486322153.57 ms
json:
flexon 0.4.9
66.328 ms53.131 ms2619288395660848584671157.34 ms
json:
serde_json 1.0.151
86.367 ms102.52 ms2619288395660848584671156.90 ms
json:
simd-json 0.17.3
53.087 ms73.007 ms2619288395660848584671156.88 ms
messagepack:
msgpacker 0.7.1
648.11 µs3.7468 ms75000056058442601450010.675 ms
messagepack:
rmp-serde 1.3.1
18.934 ms12.914 ms81250066494876639103770.576 ms
messagepack:
zerompk 0.8.0
650.89 µs3.1182 ms81250066494876639103770.151 ms
minicbor 2.3.06.0622 ms11.642 ms81250066494907639089470.690 ms
nanoserde 0.2.11.7158 ms873.29 µs6000008537850053469088.5022 ms
postcard 1.1.3514.58 µs6.5513 ms6000003537849553468978.9041 ms
protobuf:
buffa 0.9.2
8.9798 ms* 11.462 ms*14.146 ms* 13.864 ms*87500006665735642187773.402 ms
protobuf:
prost 0.14.4
8.0827 ms* 8.8207 ms*14.186 ms* 14.534 ms*87500006665735642187774.149 ms
protobuf:
protobuf 3.7.2
14.758 ms* 31.645 ms*30.673 ms* 30.865 ms*87500006665735642187777.622 ms
protobuf:
protobuf 4.36.2-release
36.576 ms* 110.77 ms*74.294 ms* 39.516 ms*87500006665735642187780.052 ms
rkyv 0.8.18199.20 µs182.57 µs* 221.60 µs*6000008537850053468728.4985 ms
ron 0.12.2187.87 ms565.27 ms2219288589703958137334150.93 ms
savefile 0.20.5194.08 µs194.59 µs6000024537851953468968.9230 ms
serde-zap 0.1.1484.91 µs1.2157 ms6000005537849753468828.5801 ms
wincode 0.6.2150.15 µs191.07 µs6000008537850053469088.7498 ms

Zero-copy deserialization speed

CrateAccessReadUpdate
capnp:
capnp 0.27.2
93.675 ns*13.741 ms* 2.2570 ms*‡
flatbuffers 25.12.192.4892 ns* 45.850 ns*41.383 µs* 48.725 µs*‡
rkyv 0.8.181.2450 ns* 5.2984 ns*38.925 µs* 39.474 µs*75.013 µs*

Comparison

Relative to best. Higher is better.

Serialize / deserialize speed and size

CrateSerializeDeserializeSizeZlibZstdZstd Time
bilrost 0.1016.12.18%* 1.73%*2.36%69.57%80.42%78.98%11.76%
bin-proto 0.12.91.72%1.76%100.00%96.35%92.05%98.70%
bitcode 0.6.910.83%26.09%100.00%100.00%100.00%64.37%
borsh 1.8.12.61%4.21%100.00%96.35%92.05%97.99%
capnp:
capnp 0.27.2
1.57% 0.78%*†42.86% 57.68%*72.68% 70.91%*81.40% 62.13%*10.50% 12.55%*
cbor:
cbor4ii 1.2.3
1.60%0.41%45.71%68.88%72.84%9.38%
cbor:
ciborium 0.2.2
0.22%0.16%45.72%68.87%72.82%9.21%
flatbuffers 25.12.1931.93%†100.00%96.35%92.05%99.34%
flexbuffers 25.12.190.15%0.23%22.55%43.54%39.42%5.53%
json:
flexon 0.4.9
0.23%0.34%22.91%54.17%57.33%5.40%
json:
serde_json 1.0.151
0.17%0.18%22.91%54.17%57.33%5.42%
json:
simd-json 0.17.3
0.28%0.25%22.91%54.17%57.33%5.42%
messagepack:
msgpacker 0.7.1
23.17%4.87%80.00%85.54%81.83%79.61%
messagepack:
rmp-serde 1.3.1
0.79%1.41%73.85%79.79%77.01%12.04%
messagepack:
zerompk 0.8.0
23.07%5.85%73.85%79.79%77.01%12.11%
minicbor 2.3.02.48%1.57%73.85%79.79%77.01%12.02%
nanoserde 0.2.18.75%20.91%100.00%96.35%92.05%99.96%
postcard 1.1.329.18%2.79%100.00%96.35%92.05%95.44%
protobuf:
buffa 0.9.2
1.67%* 1.31%*1.29%* 1.32%*68.57%77.75%76.64%11.58%
protobuf:
prost 0.14.4
1.86%* 1.70%*1.29%* 1.26%*68.57%77.75%76.64%11.46%
protobuf:
protobuf 3.7.2
1.02%* 0.47%*0.60%* 0.59%*68.57%77.75%76.64%10.95%
protobuf:
protobuf 4.36.2-release
0.41%* 0.14%*0.25%* 0.46%*68.57%77.75%76.64%10.62%
rkyv 0.8.1875.38%100.00%* 82.39%*100.00%96.35%92.05%100.00%
ron 0.12.20.08%0.03%27.04%57.77%60.48%5.63%
savefile 0.20.577.37%93.82%100.00%96.35%92.05%95.24%
serde-zap 0.1.130.96%15.02%100.00%96.35%92.05%99.05%
wincode 0.6.2100.00%95.55%100.00%96.35%92.05%97.13%

Zero-copy deserialization speed

CrateAccessReadUpdate
capnp:
capnp 0.27.2
1.33%*0.28%* 1.72%*‡
flatbuffers 25.12.1950.02%* 2.72%*94.06%* 79.89%*‡
rkyv 0.8.18100.00%* 23.50%*100.00%* 98.61%*100.00%*

minecraft_savedata

This data set is composed of Minecraft player saves that contain highly structured data.

Raw data

For operations, time per iteration; for size, bytes. Lower is better.

Serialize / deserialize speed and size

CrateSerializeDeserializeBorrowSizeZlibZstdZstd Time
bilrost 0.1016.1881.98 µs* 809.11 µs*3.2012 ms1.7558 ms4893482811732493602.6886 ms
bin-proto 0.12.91.9704 ms2.9371 ms†5669752393502314752.5091 ms
bitcode 0.6.9127.79 µs1.2824 ms172.56 µs327688200947182040795.45 µs
borsh 1.8.1522.01 µs1.8263 ms†4465952342362098342.1424 ms
capnp:
capnp 0.27.2
472.41 µs 1.0424 ms*††803896 489017*335606 293127*280744 271528*3.5424 ms 2.8109 ms*
cbor:
cbor4ii 1.2.3
705.04 µs4.7847 ms3.6436 ms11098313447452743333.5333 ms
cbor:
ciborium 0.2.2
3.7491 ms10.219 ms†11098213447512743453.5241 ms
flatbuffers 25.12.193.2549 ms††8494723478162948713.5457 ms
flexbuffers 25.12.197.6868 ms6.9206 ms5.6118 ms11876885576425537306.2992 ms
json:
flexon 0.4.9
2.3604 ms4.4470 ms†16231914665273591575.8095 ms
json:
serde_json 1.0.151
3.5385 ms7.1952 ms†16231914665273591576.0226 ms
json:
simd-json 0.17.3
2.2463 ms4.7901 ms†16231914665273591575.7474 ms
messagepack:
msgpacker 0.7.1
328.27 µs2.7946 ms1.3230 ms3912512368772203952.2171 ms
messagepack:
rmp-serde 1.3.1
1.4410 ms2.9994 ms1.7312 ms4245332452142260772.2912 ms
messagepack:
zerompk 0.8.0
357.73 µs2.1267 ms940.68 µs4160252438122249652.3481 ms
minicbor 2.3.0583.09 µs3.3520 ms1.8772 ms4287732498572286302.3998 ms
nanoserde 0.2.1273.46 µs1.8829 ms†5679752399302318722.4657 ms
postcard 1.1.3433.09 µs2.1615 ms830.80 µs3674892219132072442.0684 ms
protobuf:
buffa 0.9.2
1.0801 ms* 2.9089 ms*3.2641 ms* 3.4547 ms*2.4332 ms5968113053192687373.0603 ms
protobuf:
prost 0.14.4
1.2862 ms* 2.9817 ms*3.5071 ms* 3.5972 ms*†5968113053192687373.0203 ms
protobuf:
protobuf 3.7.2
1.0677 ms* 3.0138 ms*3.8551 ms* 4.0706 ms*†5968113053192687373.0548 ms
protobuf:
protobuf 4.36.2-release
1.7780 ms* 6.9994 ms*6.8841 ms* 3.0254 ms*†5968113053192687373.0300 ms
rkyv 0.8.18330.40 µs1.5134 ms* 1.8609 ms*†6037762547762194212.4279 ms
ron 0.12.28.5386 ms27.997 ms27.039 ms14652234349353429075.6057 ms
savefile 0.20.5219.24 µs1.9231 ms†5669912393622314782.4993 ms
serde-zap 0.1.1227.56 µs1.9675 ms693.21 µs3674132212912062422.0717 ms
wincode 0.6.2232.25 µs1.7783 ms555.15 µs5669752393502314752.5031 ms

Zero-copy deserialization speed

CrateAccessReadUpdate
capnp:
capnp 0.27.2
63.631 ns*591.29 µs* 414.57 ns*‡
flatbuffers 25.12.192.4898 ns* 2.1132 ms*1.3389 µs* 2.1287 ms*‡
rkyv 0.8.181.2451 ns* 329.00 µs*156.24 ns* 329.48 µs*764.10 ns*

Comparison

Relative to best. Higher is better.

Serialize / deserialize speed and size

CrateSerializeDeserializeBorrowSizeZlibZstdZstd Time
bilrost 0.1016.114.49%* 15.79%*40.06%9.83%66.96%71.47%73.00%29.59%
bin-proto 0.12.96.49%43.66%†57.80%83.96%78.64%31.70%
bitcode 0.6.9100.00%100.00%100.00%100.00%100.00%100.00%100.00%
borsh 1.8.124.48%70.22%†73.37%85.79%86.75%37.13%
capnp:
capnp 0.27.2
27.05% 12.26%*††40.76% 67.01%*59.88% 68.55%*64.84% 67.04%*22.46% 28.30%*
cbor:
cbor4ii 1.2.3
18.13%26.80%4.74%29.53%58.29%66.36%22.51%
cbor:
ciborium 0.2.2
3.41%12.55%†29.53%58.29%66.35%22.57%
flatbuffers 25.12.193.93%††38.58%57.77%61.74%22.43%
flexbuffers 25.12.191.66%18.53%3.07%27.59%36.04%32.88%12.63%
json:
flexon 0.4.9
5.41%28.84%†20.19%43.07%50.69%13.69%
json:
serde_json 1.0.151
3.61%17.82%†20.19%43.07%50.69%13.21%
json:
simd-json 0.17.3
5.69%26.77%†20.19%43.07%50.69%13.84%
messagepack:
msgpacker 0.7.1
38.93%45.89%13.04%83.75%84.83%82.60%35.88%
messagepack:
rmp-serde 1.3.1
8.87%42.76%9.97%77.19%81.95%80.52%34.72%
messagepack:
zerompk 0.8.0
35.72%60.30%18.34%78.77%82.42%80.92%33.88%
minicbor 2.3.021.92%38.26%9.19%76.42%80.42%79.62%33.15%
nanoserde 0.2.146.73%68.11%†57.69%83.75%78.51%32.26%
postcard 1.1.329.51%59.33%20.77%89.17%90.55%87.84%38.46%
protobuf:
buffa 0.9.2
11.83%* 4.39%*39.29%* 37.12%*7.09%54.91%65.82%67.74%25.99%
protobuf:
prost 0.14.4
9.94%* 4.29%*36.57%* 35.65%*†54.91%65.82%67.74%26.34%
protobuf:
protobuf 3.7.2
11.97%* 4.24%*33.27%* 31.50%*†54.91%65.82%67.74%26.04%
protobuf:
protobuf 4.36.2-release
7.19%* 1.83%*18.63%* 42.39%*†54.91%65.82%67.74%26.25%
rkyv 0.8.1838.68%84.74%* 68.91%*†54.27%78.87%82.96%32.76%
ron 0.12.21.50%4.58%0.64%22.36%46.20%53.09%14.19%
savefile 0.20.558.29%66.68%†57.79%83.95%78.64%31.83%
serde-zap 0.1.156.16%65.18%24.89%89.19%90.81%88.27%38.40%
wincode 0.6.255.02%72.11%31.08%57.80%83.96%78.64%31.78%

Zero-copy deserialization speed

CrateAccessReadUpdate
capnp:
capnp 0.27.2
1.96%*0.03%* 37.69%*‡
flatbuffers 25.12.1950.01%* 0.00%*11.67%* 0.01%*‡
rkyv 0.8.18100.00%* 0.00%*100.00%* 0.05%*100.00%*

mk48

This data set is composed of mk48.io game updates that contain data with many exploitable patterns and invariants.

Raw data

For operations, time per iteration; for size, bytes. Lower is better.

Serialize / deserialize speed and size

CrateSerializeDeserializeSizeZlibZstdZstd Time
bilrost 0.1016.14.5601 ms* 2.5698 ms*8.4735 ms17046431294259124566811.794 ms
bin-proto 0.12.95.6653 ms6.6314 ms17914891127998105114610.428 ms
bitcode 0.6.9691.94 µs2.3506 ms9713188780348503402.9487 ms
borsh 1.8.12.7122 ms2.8687 ms15219891108471103852810.187 ms
capnp:
capnp 0.27.2
2.6450 ms 4.5080 ms*†2724288 1616255*1546992 1278764*1239111 1125654*14.802 ms 9.0290 ms*
cbor:
cbor4ii 1.2.3
2.9288 ms19.581 ms60125391695215146495121.598 ms
cbor:
ciborium 0.2.2
23.167 ms54.761 ms60123731695146146502521.573 ms
flatbuffers 25.12.194.9501 ms†23256201439185126806013.709 ms
flexbuffers 25.12.1939.521 ms37.105 ms53526802658295277796735.407 ms
json:
flexon 0.4.9
12.812 ms22.583 ms93904612391679184276735.161 ms
json:
serde_json 1.0.151
19.186 ms33.502 ms93904612391679184276735.093 ms
json:
simd-json 0.17.3
11.729 ms27.082 ms93904612391679184276735.254 ms
messagepack:
msgpacker 0.7.1
962.24 µs5.6712 ms14587731156055113778810.000 ms
messagepack:
rmp-serde 1.3.1
9.9663 ms11.097 ms17453221261627122892311.748 ms
messagepack:
zerompk 0.8.0
1.1078 ms4.7184 ms16758661230968119500611.214 ms
minicbor 2.3.02.3250 ms11.741 ms17773861276218125255812.669 ms
nanoserde 0.2.11.2852 ms2.8054 ms18124041134820105310910.328 ms
postcard 1.1.31.8012 ms4.4540 ms1311281108390010414348.7862 ms
protobuf:
buffa 0.9.2
3.7747 ms* 8.3004 ms*8.8019 ms* 9.9886 ms*18598861338076129535112.332 ms
protobuf:
prost 0.14.4
5.4524 ms* 9.3787 ms*8.7450 ms* 9.5943 ms*18598861338076129535112.508 ms
protobuf:
protobuf 3.7.2
5.4508 ms* 12.712 ms*11.967 ms* 12.816 ms*18598861338076129535112.550 ms
protobuf:
protobuf 4.36.2-release
8.6187 ms* 31.021 ms*24.928 ms* 11.487 ms*18598861338076129535112.230 ms
rkyv 0.8.18974.23 µs2.1859 ms* 2.6585 ms*20759361383779121037713.149 ms
ron 0.12.246.035 ms178.40 ms86777032233642182618034.948 ms
savefile 0.20.5849.93 µs2.8396 ms17915051128012105115310.288 ms
serde-zap 0.1.1710.02 µs4.3132 ms1406257111780210624389.5634 ms
wincode 0.6.2640.25 µs2.3017 ms17914891127998105114610.470 ms

Zero-copy deserialization speed

CrateAccessReadUpdate
capnp:
capnp 0.27.2
68.530 ns*2.0056 ms* 468.65 ns*‡
flatbuffers 25.12.192.4900 ns* 6.2549 ms*2.5762 µs* 5.4905 ms*‡
rkyv 0.8.181.2451 ns* 460.28 µs*385.54 ns* 460.19 µs*235.41 ns*

Comparison

Relative to best. Higher is better.

Serialize / deserialize speed and size

CrateSerializeDeserializeSizeZlibZstdZstd Time
bilrost 0.1016.114.04%* 24.91%*25.80%56.98%67.84%68.26%25.00%
bin-proto 0.12.911.30%32.96%54.22%77.84%80.90%28.28%
bitcode 0.6.992.53%92.99%100.00%100.00%100.00%100.00%
borsh 1.8.123.61%76.20%63.82%79.21%81.88%28.95%
capnp:
capnp 0.27.2
24.21% 14.20%*†35.65% 60.10%*56.76% 68.66%*68.63% 75.54%*19.92% 32.66%*
cbor:
cbor4ii 1.2.3
21.86%11.16%16.15%51.79%58.05%13.65%
cbor:
ciborium 0.2.2
2.76%3.99%16.16%51.80%58.04%13.67%
flatbuffers 25.12.1912.93%†41.77%61.01%67.06%21.51%
flexbuffers 25.12.191.62%5.89%18.15%33.03%30.61%8.33%
json:
flexon 0.4.9
5.00%9.68%10.34%36.71%46.14%8.39%
json:
serde_json 1.0.151
3.34%6.52%10.34%36.71%46.14%8.40%
json:
simd-json 0.17.3
5.46%8.07%10.34%36.71%46.14%8.36%
messagepack:
msgpacker 0.7.1
66.54%38.54%66.58%75.95%74.74%29.49%
messagepack:
rmp-serde 1.3.1
6.42%19.70%55.65%69.60%69.19%25.10%
messagepack:
zerompk 0.8.0
57.79%46.33%57.96%71.33%71.16%26.29%
minicbor 2.3.027.54%18.62%54.65%68.80%67.89%23.27%
nanoserde 0.2.149.82%77.92%53.59%77.37%80.75%28.55%
postcard 1.1.335.55%49.08%74.07%81.01%81.65%33.56%
protobuf:
buffa 0.9.2
16.96%* 7.71%*24.83%* 21.88%*52.22%65.62%65.65%23.91%
protobuf:
prost 0.14.4
11.74%* 6.83%*25.00%* 22.78%*52.22%65.62%65.65%23.57%
protobuf:
protobuf 3.7.2
11.75%* 5.04%*18.27%* 17.06%*52.22%65.62%65.65%23.50%
protobuf:
protobuf 4.36.2-release
7.43%* 2.06%*8.77%* 19.03%*52.22%65.62%65.65%24.11%
rkyv 0.8.1865.72%100.00%* 82.22%*46.79%63.45%70.25%22.42%
ron 0.12.21.39%1.23%11.19%39.31%46.56%8.44%
savefile 0.20.575.33%76.98%54.22%77.84%80.90%28.66%
serde-zap 0.1.190.17%50.68%69.07%78.55%80.04%30.83%
wincode 0.6.2100.00%94.97%54.22%77.84%80.90%28.16%

Zero-copy deserialization speed

CrateAccessReadUpdate
capnp:
capnp 0.27.2
1.82%*0.02%* 82.27%*‡
flatbuffers 25.12.1950.00%* 0.00%*14.97%* 0.01%*‡
rkyv 0.8.18100.00%* 0.00%*100.00%* 0.08%*100.00%*

Footnotes:

* mouse over for situational details

† this deserialization capability is not supported

‡ buffer mutation is not supported (capnp and flatbuffers may but not for rust)

djkoloski/rust_serialization_benchmark

Benchmarks for rust serialization frameworks

Rust

1,019

204 commits

updated Oct 6, 2026

See the code

README

Rust serialization benchmark

The goal of these benchmarks is to provide thorough and complete benchmarks for various rust serialization frameworks.

Contributing

See CONTRIBUTING.md.

Maintainers

These benchmarks are maintained by a small group of volunteers. Special thanks to:

These benchmarks are a work in progress

These benchmarks are still being developed and pull requests to improve benchmarks are welcome.

Interactive site

Calculate the number of messages per second that can be sent/received with various rust serialization frameworks and compression libraries. Documentation

Format

All tests benchmark the following properties (time or size):

  • Serialize: serialize data into a buffer
  • Deserialize: deserializes a buffer into a normal rust object
  • Borrow: deserializes a buffer into a rust object that borrows string data from the input, with lifetime
  • Size: the size of the buffer when serialized
  • Zlib: the size of the buffer after zlib compression
  • Zstd: the size of the buffer after zstd compression
  • Zstd Time: the time taken to compress the serialized buffer with zstd

Zero-copy deserialization libraries have an additional set of benchmarks:

  • Access: accesses a buffer as structured data
  • Read: runs through a buffer and reads fields out of it
  • Update: updates a buffer as structured data

Some benchmark results may be italicized and followed by an asterisk. Mouse over these for more details on what situation was benchmarked. Some common terms for those variants:

  • (populate): copying or converting from the "regular" input type to the type generated by the library
  • (convert): copying or converting back from the library's generated type to the "regular" input type after deserializing

Other footnotes are located at the bottom of the page.

Last updated: 2026-10-05 23:16:23

Runtime info

rustc version

rustc 1.101.0-nightly (282215592 2026-10-04)
binary: rustc
commit-hash: 28221559263a3976766cf305940e80e30cf9ba8a
commit-date: 2026-10-04
host: x86_64-unknown-linux-gnu
release: 1.101.0-nightly
LLVM version: 23.1.3

CPU info

Architecture:                            x86_64
CPU op-mode(s):                          32-bit, 64-bit
Address sizes:                           48 bits physical, 48 bits virtual
Byte Order:                              Little Endian
CPU(s):                                  4
On-line CPU(s) list:                     0-3
Vendor ID:                               AuthenticAMD
Model name:                              AMD EPYC 7763 64-Core Processor
CPU family:                              25
Model:                                   1
Thread(s) per core:                      2
Core(s) per socket:                      2
Socket(s):                               1
Stepping:                                1
BogoMIPS:                                4890.85
Flags:                                   fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good nopl tsc_reliable nonstop_tsc cpuid extd_apicid aperfmperf tsc_known_freq pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 movbe popcnt aes xsave avx f16c rdrand hypervisor lahf_lm cmp_legacy svm cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw topoext vmmcall fsgsbase bmi1 avx2 smep bmi2 erms invpcid rdseed adx smap clflushopt clwb sha_ni xsaveopt xsavec xgetbv1 xsaves user_shstk clzero xsaveerptr rdpru arat npt nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold v_vmsave_vmload umip vaes vpclmulqdq rdpid fsrm
Virtualization:                          AMD-V
Hypervisor vendor:                       Microsoft
Virtualization type:                     full
L1d cache:                               64 KiB (2 instances)
L1i cache:                               64 KiB (2 instances)
L2 cache:                                1 MiB (2 instances)
L3 cache:                                32 MiB (1 instance)
NUMA node(s):                            1
NUMA node0 CPU(s):                       0-3
Vulnerability Gather data sampling:      Not affected
Vulnerability Ghostwrite:                Not affected
Vulnerability Indirect target selection: Not affected
Vulnerability Itlb multihit:             Not affected
Vulnerability L1tf:                      Not affected
Vulnerability Mds:                       Not affected
Vulnerability Meltdown:                  Not affected
Vulnerability Mmio stale data:           Not affected
Vulnerability Old microcode:             Not affected
Vulnerability Reg file data sampling:    Not affected
Vulnerability Retbleed:                  Not affected
Vulnerability Spec rstack overflow:      Vulnerable: Safe RET, no microcode
Vulnerability Spec store bypass:         Vulnerable
Vulnerability Spectre v1:                Mitigation; usercopy/swapgs barriers and __user pointer sanitization
Vulnerability Spectre v2:                Mitigation; Retpolines; STIBP disabled; RSB filling; PBRSB-eIBRS Not affected; BHI Not affected
Vulnerability Srbds:                     Not affected
Vulnerability Tsa:                       Vulnerable: No microcode
Vulnerability Tsx async abort:           Not affected
Vulnerability Vmscape:                   Not affected

log

This data set is composed of HTTP request logs that are small and contain many strings.

Raw data

For operations, time per iteration; for size, bytes. Lower is better.

Serialize / deserialize speed and size

CrateSerializeDeserializeBorrowSizeZlibZstdZstd Time
bilrost 0.1016.1474.26 µs* 424.95 µs*2.6719 ms889.80 µs8049553289412848493.7794 ms
bin-proto 0.12.94.6040 ms4.6570 ms†10457843731273115534.9875 ms
bitcode 0.6.9146.23 µs1.4627 ms62.383 µs7037102888262273222.4072 ms
borsh 1.8.1538.00 µs2.1794 ms†8857803622042862484.2598 ms
capnp:
capnp 0.27.2
614.45 µs 1.4923 ms*††1443216 1046865*513986 481681*426532 458024*6.2052 ms 5.4661 ms*
cbor:
cbor4ii 1.2.3
612.39 µs5.0893 ms3.5661 ms14078354034403235614.8618 ms
cbor:
ciborium 0.2.2
4.0821 ms11.941 ms†14078354034403235615.1075 ms
flatbuffers 25.12.191.0480 ms††12763684685393883814.8758 ms
flexbuffers 25.12.196.5149 ms7.1869 ms5.4444 ms18297567143186915418.7442 ms
json:
flexon 0.4.9
2.3589 ms3.6965 ms†18274614705603607275.9821 ms
json:
serde_json 1.0.151
3.6304 ms6.1963 ms†18274614705603607275.5363 ms
json:
simd-json 0.17.3
2.2017 ms4.8315 ms†18274614705603607275.5555 ms
messagepack:
msgpacker 0.7.1
348.64 µs2.5756 ms935.01 µs7649963152912642123.6109 ms
messagepack:
rmp-serde 1.3.1
1.4680 ms3.1443 ms1.5417 ms7849973253842776083.8686 ms
messagepack:
zerompk 0.8.0
349.11 µs2.2330 ms750.41 µs7849973253842776083.8326 ms
minicbor 2.3.0509.76 µs2.9704 ms1.4188 ms8178303326712840344.0535 ms
nanoserde 0.2.1262.19 µs2.1097 ms†10457843731273115534.2755 ms
postcard 1.1.3415.58 µs2.3385 ms628.78 µs7249533023992529683.2483 ms
protobuf:
buffa 0.9.2
905.35 µs* 2.3891 ms*3.0463 ms* 3.1747 ms*1.7834 ms8846283631303149594.4780 ms
protobuf:
prost 0.14.4
951.15 µs* 2.4626 ms*3.3833 ms* 3.4300 ms*†8846283631303149594.7934 ms
protobuf:
protobuf 3.7.2
1.3333 ms* 3.1605 ms*3.9048 ms* 3.9938 ms*†8846283631303149594.7646 ms
protobuf:
protobuf 4.36.2-release
1.7391 ms* 7.5239 ms*7.5075 ms* 3.1102 ms*†8846283631303149594.4944 ms
rkyv 0.8.18251.61 µs1.5571 ms* 1.9202 ms*†10114883935263259654.9764 ms
ron 0.12.212.534 ms27.073 ms25.085 ms16074594491583493245.6759 ms
savefile 0.20.5193.79 µs2.1189 ms†10458003731393115624.2223 ms
serde-zap 0.1.1193.14 µs2.1222 ms515.45 µs7412953039442564223.4173 ms
wincode 0.6.2191.41 µs1.8207 ms369.46 µs10457843731273115534.3746 ms

Zero-copy deserialization speed

CrateAccessReadUpdate
capnp:
capnp 0.27.2
64.650 ns*1.0451 ms* 151.39 µs*‡
flatbuffers 25.12.192.4940 ns* 2.0673 ms*49.918 µs* 2.0601 ms*‡
rkyv 0.8.181.2452 ns* 366.88 µs*10.456 µs* 377.82 µs*8.9682 µs*

Comparison

Relative to best. Higher is better.

Serialize / deserialize speed and size

CrateSerializeDeserializeBorrowSizeZlibZstdZstd Time
bilrost 0.1016.130.83%* 34.41%*54.74%7.01%87.42%87.80%79.80%63.69%
bin-proto 0.12.93.18%31.41%†67.29%77.41%72.96%48.26%
bitcode 0.6.9100.00%100.00%100.00%100.00%100.00%100.00%100.00%
borsh 1.8.127.18%67.11%†79.45%79.74%79.41%56.51%
capnp:
capnp 0.27.2
23.80% 9.80%*††48.76% 67.22%*56.19% 59.96%*53.30% 49.63%*38.79% 44.04%*
cbor:
cbor4ii 1.2.3
23.88%28.74%1.75%49.99%71.59%70.26%49.51%
cbor:
ciborium 0.2.2
3.58%12.25%†49.99%71.59%70.26%47.13%
flatbuffers 25.12.1913.95%††55.13%61.64%58.53%49.37%
flexbuffers 25.12.192.24%20.35%1.15%38.46%40.43%32.87%27.53%
json:
flexon 0.4.9
6.20%39.57%†38.51%61.38%63.02%40.24%
json:
serde_json 1.0.151
4.03%23.61%†38.51%61.38%63.02%43.48%
json:
simd-json 0.17.3
6.64%30.27%†38.51%61.38%63.02%43.33%
messagepack:
msgpacker 0.7.1
41.94%56.79%6.67%91.99%91.61%86.04%66.66%
messagepack:
rmp-serde 1.3.1
9.96%46.52%4.05%89.64%88.76%81.89%62.22%
messagepack:
zerompk 0.8.0
41.89%65.50%8.31%89.64%88.76%81.89%62.81%
minicbor 2.3.028.69%49.24%4.40%86.05%86.82%80.03%59.39%
nanoserde 0.2.155.77%69.33%†67.29%77.41%72.96%56.30%
postcard 1.1.335.19%62.55%9.92%97.07%95.51%89.86%74.11%
protobuf:
buffa 0.9.2
16.15%* 6.12%*48.02%* 46.07%*3.50%79.55%79.54%72.18%53.76%
protobuf:
prost 0.14.4
15.37%* 5.94%*43.23%* 42.64%*†79.55%79.54%72.18%50.22%
protobuf:
protobuf 3.7.2
10.97%* 4.63%*37.46%* 36.62%*†79.55%79.54%72.18%50.52%
protobuf:
protobuf 4.36.2-release
8.41%* 1.94%*19.48%* 47.03%*†79.55%79.54%72.18%53.56%
rkyv 0.8.1858.12%93.94%* 76.17%*†69.57%73.39%69.74%48.37%
ron 0.12.21.17%5.40%0.25%43.78%64.30%65.07%42.41%
savefile 0.20.575.46%69.03%†67.29%77.40%72.96%57.01%
serde-zap 0.1.175.71%68.92%12.10%94.93%95.03%88.65%70.44%
wincode 0.6.276.40%80.34%16.88%67.29%77.41%72.96%55.03%

Zero-copy deserialization speed

CrateAccessReadUpdate
capnp:
capnp 0.27.2
1.93%*1.00%* 6.91%*‡
flatbuffers 25.12.1949.93%* 0.00%*20.95%* 0.51%*‡
rkyv 0.8.18100.00%* 0.00%*100.00%* 2.77%*100.00%*

mesh

This data set is a single mesh. The mesh contains an array of triangles, each of which has three vertices and a normal vector.

Raw data

For operations, time per iteration; for size, bytes. Lower is better.

Serialize / deserialize speed and size

CrateSerializeDeserializeSizeZlibZstdZstd Time
bilrost 0.1016.16.8896 ms* 8.6870 ms*7.7424 ms86250056443961623157272.266 ms
bin-proto 0.12.98.7296 ms10.379 ms6000008537850053469088.6105 ms
bitcode 0.6.91.3867 ms699.82 µs60000065182295492184113.203 ms
borsh 1.8.15.7577 ms4.3384 ms6000004537849653468668.6725 ms
capnp:
capnp 0.27.2
9.5364 ms 19.341 ms*†14000088 10401737*7130367 7308001*6046182 7922110*80.914 ms 67.707 ms*
cbor:
cbor4ii 1.2.3
9.4013 ms44.877 ms131250167524114675743790.558 ms
cbor:
ciborium 0.2.2
67.789 ms112.54 ms131223247524660675912892.242 ms
flatbuffers 25.12.19470.18 µs†6000024537843453468788.5548 ms
flexbuffers 25.12.19100.57 ms77.696 ms266094241190104012486322153.57 ms
json:
flexon 0.4.9
66.328 ms53.131 ms2619288395660848584671157.34 ms
json:
serde_json 1.0.151
86.367 ms102.52 ms2619288395660848584671156.90 ms
json:
simd-json 0.17.3
53.087 ms73.007 ms2619288395660848584671156.88 ms
messagepack:
msgpacker 0.7.1
648.11 µs3.7468 ms75000056058442601450010.675 ms
messagepack:
rmp-serde 1.3.1
18.934 ms12.914 ms81250066494876639103770.576 ms
messagepack:
zerompk 0.8.0
650.89 µs3.1182 ms81250066494876639103770.151 ms
minicbor 2.3.06.0622 ms11.642 ms81250066494907639089470.690 ms
nanoserde 0.2.11.7158 ms873.29 µs6000008537850053469088.5022 ms
postcard 1.1.3514.58 µs6.5513 ms6000003537849553468978.9041 ms
protobuf:
buffa 0.9.2
8.9798 ms* 11.462 ms*14.146 ms* 13.864 ms*87500006665735642187773.402 ms
protobuf:
prost 0.14.4
8.0827 ms* 8.8207 ms*14.186 ms* 14.534 ms*87500006665735642187774.149 ms
protobuf:
protobuf 3.7.2
14.758 ms* 31.645 ms*30.673 ms* 30.865 ms*87500006665735642187777.622 ms
protobuf:
protobuf 4.36.2-release
36.576 ms* 110.77 ms*74.294 ms* 39.516 ms*87500006665735642187780.052 ms
rkyv 0.8.18199.20 µs182.57 µs* 221.60 µs*6000008537850053468728.4985 ms
ron 0.12.2187.87 ms565.27 ms2219288589703958137334150.93 ms
savefile 0.20.5194.08 µs194.59 µs6000024537851953468968.9230 ms
serde-zap 0.1.1484.91 µs1.2157 ms6000005537849753468828.5801 ms
wincode 0.6.2150.15 µs191.07 µs6000008537850053469088.7498 ms

Zero-copy deserialization speed

CrateAccessReadUpdate
capnp:
capnp 0.27.2
93.675 ns*13.741 ms* 2.2570 ms*‡
flatbuffers 25.12.192.4892 ns* 45.850 ns*41.383 µs* 48.725 µs*‡
rkyv 0.8.181.2450 ns* 5.2984 ns*38.925 µs* 39.474 µs*75.013 µs*

Comparison

Relative to best. Higher is better.

Serialize / deserialize speed and size

CrateSerializeDeserializeSizeZlibZstdZstd Time
bilrost 0.1016.12.18%* 1.73%*2.36%69.57%80.42%78.98%11.76%
bin-proto 0.12.91.72%1.76%100.00%96.35%92.05%98.70%
bitcode 0.6.910.83%26.09%100.00%100.00%100.00%64.37%
borsh 1.8.12.61%4.21%100.00%96.35%92.05%97.99%
capnp:
capnp 0.27.2
1.57% 0.78%*†42.86% 57.68%*72.68% 70.91%*81.40% 62.13%*10.50% 12.55%*
cbor:
cbor4ii 1.2.3
1.60%0.41%45.71%68.88%72.84%9.38%
cbor:
ciborium 0.2.2
0.22%0.16%45.72%68.87%72.82%9.21%
flatbuffers 25.12.1931.93%†100.00%96.35%92.05%99.34%
flexbuffers 25.12.190.15%0.23%22.55%43.54%39.42%5.53%
json:
flexon 0.4.9
0.23%0.34%22.91%54.17%57.33%5.40%
json:
serde_json 1.0.151
0.17%0.18%22.91%54.17%57.33%5.42%
json:
simd-json 0.17.3
0.28%0.25%22.91%54.17%57.33%5.42%
messagepack:
msgpacker 0.7.1
23.17%4.87%80.00%85.54%81.83%79.61%
messagepack:
rmp-serde 1.3.1
0.79%1.41%73.85%79.79%77.01%12.04%
messagepack:
zerompk 0.8.0
23.07%5.85%73.85%79.79%77.01%12.11%
minicbor 2.3.02.48%1.57%73.85%79.79%77.01%12.02%
nanoserde 0.2.18.75%20.91%100.00%96.35%92.05%99.96%
postcard 1.1.329.18%2.79%100.00%96.35%92.05%95.44%
protobuf:
buffa 0.9.2
1.67%* 1.31%*1.29%* 1.32%*68.57%77.75%76.64%11.58%
protobuf:
prost 0.14.4
1.86%* 1.70%*1.29%* 1.26%*68.57%77.75%76.64%11.46%
protobuf:
protobuf 3.7.2
1.02%* 0.47%*0.60%* 0.59%*68.57%77.75%76.64%10.95%
protobuf:
protobuf 4.36.2-release
0.41%* 0.14%*0.25%* 0.46%*68.57%77.75%76.64%10.62%
rkyv 0.8.1875.38%100.00%* 82.39%*100.00%96.35%92.05%100.00%
ron 0.12.20.08%0.03%27.04%57.77%60.48%5.63%
savefile 0.20.577.37%93.82%100.00%96.35%92.05%95.24%
serde-zap 0.1.130.96%15.02%100.00%96.35%92.05%99.05%
wincode 0.6.2100.00%95.55%100.00%96.35%92.05%97.13%

Zero-copy deserialization speed

CrateAccessReadUpdate
capnp:
capnp 0.27.2
1.33%*0.28%* 1.72%*‡
flatbuffers 25.12.1950.02%* 2.72%*94.06%* 79.89%*‡
rkyv 0.8.18100.00%* 23.50%*100.00%* 98.61%*100.00%*

minecraft_savedata

This data set is composed of Minecraft player saves that contain highly structured data.

Raw data

For operations, time per iteration; for size, bytes. Lower is better.

Serialize / deserialize speed and size

CrateSerializeDeserializeBorrowSizeZlibZstdZstd Time
bilrost 0.1016.1881.98 µs* 809.11 µs*3.2012 ms1.7558 ms4893482811732493602.6886 ms
bin-proto 0.12.91.9704 ms2.9371 ms†5669752393502314752.5091 ms
bitcode 0.6.9127.79 µs1.2824 ms172.56 µs327688200947182040795.45 µs
borsh 1.8.1522.01 µs1.8263 ms†4465952342362098342.1424 ms
capnp:
capnp 0.27.2
472.41 µs 1.0424 ms*††803896 489017*335606 293127*280744 271528*3.5424 ms 2.8109 ms*
cbor:
cbor4ii 1.2.3
705.04 µs4.7847 ms3.6436 ms11098313447452743333.5333 ms
cbor:
ciborium 0.2.2
3.7491 ms10.219 ms†11098213447512743453.5241 ms
flatbuffers 25.12.193.2549 ms††8494723478162948713.5457 ms
flexbuffers 25.12.197.6868 ms6.9206 ms5.6118 ms11876885576425537306.2992 ms
json:
flexon 0.4.9
2.3604 ms4.4470 ms†16231914665273591575.8095 ms
json:
serde_json 1.0.151
3.5385 ms7.1952 ms†16231914665273591576.0226 ms
json:
simd-json 0.17.3
2.2463 ms4.7901 ms†16231914665273591575.7474 ms
messagepack:
msgpacker 0.7.1
328.27 µs2.7946 ms1.3230 ms3912512368772203952.2171 ms
messagepack:
rmp-serde 1.3.1
1.4410 ms2.9994 ms1.7312 ms4245332452142260772.2912 ms
messagepack:
zerompk 0.8.0
357.73 µs2.1267 ms940.68 µs4160252438122249652.3481 ms
minicbor 2.3.0583.09 µs3.3520 ms1.8772 ms4287732498572286302.3998 ms
nanoserde 0.2.1273.46 µs1.8829 ms†5679752399302318722.4657 ms
postcard 1.1.3433.09 µs2.1615 ms830.80 µs3674892219132072442.0684 ms
protobuf:
buffa 0.9.2
1.0801 ms* 2.9089 ms*3.2641 ms* 3.4547 ms*2.4332 ms5968113053192687373.0603 ms
protobuf:
prost 0.14.4
1.2862 ms* 2.9817 ms*3.5071 ms* 3.5972 ms*†5968113053192687373.0203 ms
protobuf:
protobuf 3.7.2
1.0677 ms* 3.0138 ms*3.8551 ms* 4.0706 ms*†5968113053192687373.0548 ms
protobuf:
protobuf 4.36.2-release
1.7780 ms* 6.9994 ms*6.8841 ms* 3.0254 ms*†5968113053192687373.0300 ms
rkyv 0.8.18330.40 µs1.5134 ms* 1.8609 ms*†6037762547762194212.4279 ms
ron 0.12.28.5386 ms27.997 ms27.039 ms14652234349353429075.6057 ms
savefile 0.20.5219.24 µs1.9231 ms†5669912393622314782.4993 ms
serde-zap 0.1.1227.56 µs1.9675 ms693.21 µs3674132212912062422.0717 ms
wincode 0.6.2232.25 µs1.7783 ms555.15 µs5669752393502314752.5031 ms

Zero-copy deserialization speed

CrateAccessReadUpdate
capnp:
capnp 0.27.2
63.631 ns*591.29 µs* 414.57 ns*‡
flatbuffers 25.12.192.4898 ns* 2.1132 ms*1.3389 µs* 2.1287 ms*‡
rkyv 0.8.181.2451 ns* 329.00 µs*156.24 ns* 329.48 µs*764.10 ns*

Comparison

Relative to best. Higher is better.

Serialize / deserialize speed and size

CrateSerializeDeserializeBorrowSizeZlibZstdZstd Time
bilrost 0.1016.114.49%* 15.79%*40.06%9.83%66.96%71.47%73.00%29.59%
bin-proto 0.12.96.49%43.66%†57.80%83.96%78.64%31.70%
bitcode 0.6.9100.00%100.00%100.00%100.00%100.00%100.00%100.00%
borsh 1.8.124.48%70.22%†73.37%85.79%86.75%37.13%
capnp:
capnp 0.27.2
27.05% 12.26%*††40.76% 67.01%*59.88% 68.55%*64.84% 67.04%*22.46% 28.30%*
cbor:
cbor4ii 1.2.3
18.13%26.80%4.74%29.53%58.29%66.36%22.51%
cbor:
ciborium 0.2.2
3.41%12.55%†29.53%58.29%66.35%22.57%
flatbuffers 25.12.193.93%††38.58%57.77%61.74%22.43%
flexbuffers 25.12.191.66%18.53%3.07%27.59%36.04%32.88%12.63%
json:
flexon 0.4.9
5.41%28.84%†20.19%43.07%50.69%13.69%
json:
serde_json 1.0.151
3.61%17.82%†20.19%43.07%50.69%13.21%
json:
simd-json 0.17.3
5.69%26.77%†20.19%43.07%50.69%13.84%
messagepack:
msgpacker 0.7.1
38.93%45.89%13.04%83.75%84.83%82.60%35.88%
messagepack:
rmp-serde 1.3.1
8.87%42.76%9.97%77.19%81.95%80.52%34.72%
messagepack:
zerompk 0.8.0
35.72%60.30%18.34%78.77%82.42%80.92%33.88%
minicbor 2.3.021.92%38.26%9.19%76.42%80.42%79.62%33.15%
nanoserde 0.2.146.73%68.11%†57.69%83.75%78.51%32.26%
postcard 1.1.329.51%59.33%20.77%89.17%90.55%87.84%38.46%
protobuf:
buffa 0.9.2
11.83%* 4.39%*39.29%* 37.12%*7.09%54.91%65.82%67.74%25.99%
protobuf:
prost 0.14.4
9.94%* 4.29%*36.57%* 35.65%*†54.91%65.82%67.74%26.34%
protobuf:
protobuf 3.7.2
11.97%* 4.24%*33.27%* 31.50%*†54.91%65.82%67.74%26.04%
protobuf:
protobuf 4.36.2-release
7.19%* 1.83%*18.63%* 42.39%*†54.91%65.82%67.74%26.25%
rkyv 0.8.1838.68%84.74%* 68.91%*†54.27%78.87%82.96%32.76%
ron 0.12.21.50%4.58%0.64%22.36%46.20%53.09%14.19%
savefile 0.20.558.29%66.68%†57.79%83.95%78.64%31.83%
serde-zap 0.1.156.16%65.18%24.89%89.19%90.81%88.27%38.40%
wincode 0.6.255.02%72.11%31.08%57.80%83.96%78.64%31.78%

Zero-copy deserialization speed

CrateAccessReadUpdate
capnp:
capnp 0.27.2
1.96%*0.03%* 37.69%*‡
flatbuffers 25.12.1950.01%* 0.00%*11.67%* 0.01%*‡
rkyv 0.8.18100.00%* 0.00%*100.00%* 0.05%*100.00%*

mk48

This data set is composed of mk48.io game updates that contain data with many exploitable patterns and invariants.

Raw data

For operations, time per iteration; for size, bytes. Lower is better.

Serialize / deserialize speed and size

CrateSerializeDeserializeSizeZlibZstdZstd Time
bilrost 0.1016.14.5601 ms* 2.5698 ms*8.4735 ms17046431294259124566811.794 ms
bin-proto 0.12.95.6653 ms6.6314 ms17914891127998105114610.428 ms
bitcode 0.6.9691.94 µs2.3506 ms9713188780348503402.9487 ms
borsh 1.8.12.7122 ms2.8687 ms15219891108471103852810.187 ms
capnp:
capnp 0.27.2
2.6450 ms 4.5080 ms*†2724288 1616255*1546992 1278764*1239111 1125654*14.802 ms 9.0290 ms*
cbor:
cbor4ii 1.2.3
2.9288 ms19.581 ms60125391695215146495121.598 ms
cbor:
ciborium 0.2.2
23.167 ms54.761 ms60123731695146146502521.573 ms
flatbuffers 25.12.194.9501 ms†23256201439185126806013.709 ms
flexbuffers 25.12.1939.521 ms37.105 ms53526802658295277796735.407 ms
json:
flexon 0.4.9
12.812 ms22.583 ms93904612391679184276735.161 ms
json:
serde_json 1.0.151
19.186 ms33.502 ms93904612391679184276735.093 ms
json:
simd-json 0.17.3
11.729 ms27.082 ms93904612391679184276735.254 ms
messagepack:
msgpacker 0.7.1
962.24 µs5.6712 ms14587731156055113778810.000 ms
messagepack:
rmp-serde 1.3.1
9.9663 ms11.097 ms17453221261627122892311.748 ms
messagepack:
zerompk 0.8.0
1.1078 ms4.7184 ms16758661230968119500611.214 ms
minicbor 2.3.02.3250 ms11.741 ms17773861276218125255812.669 ms
nanoserde 0.2.11.2852 ms2.8054 ms18124041134820105310910.328 ms
postcard 1.1.31.8012 ms4.4540 ms1311281108390010414348.7862 ms
protobuf:
buffa 0.9.2
3.7747 ms* 8.3004 ms*8.8019 ms* 9.9886 ms*18598861338076129535112.332 ms
protobuf:
prost 0.14.4
5.4524 ms* 9.3787 ms*8.7450 ms* 9.5943 ms*18598861338076129535112.508 ms
protobuf:
protobuf 3.7.2
5.4508 ms* 12.712 ms*11.967 ms* 12.816 ms*18598861338076129535112.550 ms
protobuf:
protobuf 4.36.2-release
8.6187 ms* 31.021 ms*24.928 ms* 11.487 ms*18598861338076129535112.230 ms
rkyv 0.8.18974.23 µs2.1859 ms* 2.6585 ms*20759361383779121037713.149 ms
ron 0.12.246.035 ms178.40 ms86777032233642182618034.948 ms
savefile 0.20.5849.93 µs2.8396 ms17915051128012105115310.288 ms
serde-zap 0.1.1710.02 µs4.3132 ms1406257111780210624389.5634 ms
wincode 0.6.2640.25 µs2.3017 ms17914891127998105114610.470 ms

Zero-copy deserialization speed

CrateAccessReadUpdate
capnp:
capnp 0.27.2
68.530 ns*2.0056 ms* 468.65 ns*‡
flatbuffers 25.12.192.4900 ns* 6.2549 ms*2.5762 µs* 5.4905 ms*‡
rkyv 0.8.181.2451 ns* 460.28 µs*385.54 ns* 460.19 µs*235.41 ns*

Comparison

Relative to best. Higher is better.

Serialize / deserialize speed and size

CrateSerializeDeserializeSizeZlibZstdZstd Time
bilrost 0.1016.114.04%* 24.91%*25.80%56.98%67.84%68.26%25.00%
bin-proto 0.12.911.30%32.96%54.22%77.84%80.90%28.28%
bitcode 0.6.992.53%92.99%100.00%100.00%100.00%100.00%
borsh 1.8.123.61%76.20%63.82%79.21%81.88%28.95%
capnp:
capnp 0.27.2
24.21% 14.20%*†35.65% 60.10%*56.76% 68.66%*68.63% 75.54%*19.92% 32.66%*
cbor:
cbor4ii 1.2.3
21.86%11.16%16.15%51.79%58.05%13.65%
cbor:
ciborium 0.2.2
2.76%3.99%16.16%51.80%58.04%13.67%
flatbuffers 25.12.1912.93%†41.77%61.01%67.06%21.51%
flexbuffers 25.12.191.62%5.89%18.15%33.03%30.61%8.33%
json:
flexon 0.4.9
5.00%9.68%10.34%36.71%46.14%8.39%
json:
serde_json 1.0.151
3.34%6.52%10.34%36.71%46.14%8.40%
json:
simd-json 0.17.3
5.46%8.07%10.34%36.71%46.14%8.36%
messagepack:
msgpacker 0.7.1
66.54%38.54%66.58%75.95%74.74%29.49%
messagepack:
rmp-serde 1.3.1
6.42%19.70%55.65%69.60%69.19%25.10%
messagepack:
zerompk 0.8.0
57.79%46.33%57.96%71.33%71.16%26.29%
minicbor 2.3.027.54%18.62%54.65%68.80%67.89%23.27%
nanoserde 0.2.149.82%77.92%53.59%77.37%80.75%28.55%
postcard 1.1.335.55%49.08%74.07%81.01%81.65%33.56%
protobuf:
buffa 0.9.2
16.96%* 7.71%*24.83%* 21.88%*52.22%65.62%65.65%23.91%
protobuf:
prost 0.14.4
11.74%* 6.83%*25.00%* 22.78%*52.22%65.62%65.65%23.57%
protobuf:
protobuf 3.7.2
11.75%* 5.04%*18.27%* 17.06%*52.22%65.62%65.65%23.50%
protobuf:
protobuf 4.36.2-release
7.43%* 2.06%*8.77%* 19.03%*52.22%65.62%65.65%24.11%
rkyv 0.8.1865.72%100.00%* 82.22%*46.79%63.45%70.25%22.42%
ron 0.12.21.39%1.23%11.19%39.31%46.56%8.44%
savefile 0.20.575.33%76.98%54.22%77.84%80.90%28.66%
serde-zap 0.1.190.17%50.68%69.07%78.55%80.04%30.83%
wincode 0.6.2100.00%94.97%54.22%77.84%80.90%28.16%

Zero-copy deserialization speed

CrateAccessReadUpdate
capnp:
capnp 0.27.2
1.82%*0.02%* 82.27%*‡
flatbuffers 25.12.1950.00%* 0.00%*14.97%* 0.01%*‡
rkyv 0.8.18100.00%* 0.00%*100.00%* 0.08%*100.00%*

Footnotes:

* mouse over for situational details

† this deserialization capability is not supported

‡ buffer mutation is not supported (capnp and flatbuffers may but not for rust)

Significant stargazers

(top 24 of 50)

Samuel Colvin

6,711 followers · starred May 2024

Ian Stapleton Cordasco

1,674 followers · starred Jan 2026

Emil Ernerfeldt

8,202 followers · starred Oct 2023

Weihang Lo

634 followers · starred May 2025