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):

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

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:

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

Crate Serialize Deserialize Borrow Size Zlib Zstd Zstd Time
bilrost 0.1016.1 474.26 µs* 424.95 µs* 2.6719 ms 889.80 µs 804955 328941 284849 3.7794 ms
bin-proto 0.12.9 4.6040 ms 4.6570 ms † 1045784 373127 311553 4.9875 ms
bitcode 0.6.9 146.23 µs 1.4627 ms 62.383 µs 703710 288826 227322 2.4072 ms
borsh 1.8.1 538.00 µs 2.1794 ms † 885780 362204 286248 4.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 µs 5.0893 ms 3.5661 ms 1407835 403440 323561 4.8618 ms
cbor:
ciborium 0.2.2
4.0821 ms 11.941 ms † 1407835 403440 323561 5.1075 ms
flatbuffers 25.12.19 1.0480 ms † † 1276368 468539 388381 4.8758 ms
flexbuffers 25.12.19 6.5149 ms 7.1869 ms 5.4444 ms 1829756 714318 691541 8.7442 ms
json:
flexon 0.4.9
2.3589 ms 3.6965 ms † 1827461 470560 360727 5.9821 ms
json:
serde_json 1.0.151
3.6304 ms 6.1963 ms † 1827461 470560 360727 5.5363 ms
json:
simd-json 0.17.3
2.2017 ms 4.8315 ms † 1827461 470560 360727 5.5555 ms
messagepack:
msgpacker 0.7.1
348.64 µs 2.5756 ms 935.01 µs 764996 315291 264212 3.6109 ms
messagepack:
rmp-serde 1.3.1
1.4680 ms 3.1443 ms 1.5417 ms 784997 325384 277608 3.8686 ms
messagepack:
zerompk 0.8.0
349.11 µs 2.2330 ms 750.41 µs 784997 325384 277608 3.8326 ms
minicbor 2.3.0 509.76 µs 2.9704 ms 1.4188 ms 817830 332671 284034 4.0535 ms
nanoserde 0.2.1 262.19 µs 2.1097 ms † 1045784 373127 311553 4.2755 ms
postcard 1.1.3 415.58 µs 2.3385 ms 628.78 µs 724953 302399 252968 3.2483 ms
protobuf:
buffa 0.9.2
905.35 µs* 2.3891 ms* 3.0463 ms* 3.1747 ms* 1.7834 ms 884628 363130 314959 4.4780 ms
protobuf:
prost 0.14.4
951.15 µs* 2.4626 ms* 3.3833 ms* 3.4300 ms* † 884628 363130 314959 4.7934 ms
protobuf:
protobuf 3.7.2
1.3333 ms* 3.1605 ms* 3.9048 ms* 3.9938 ms* † 884628 363130 314959 4.7646 ms
protobuf:
protobuf 4.36.2-release
1.7391 ms* 7.5239 ms* 7.5075 ms* 3.1102 ms* † 884628 363130 314959 4.4944 ms
rkyv 0.8.18 251.61 µs 1.5571 ms* 1.9202 ms* † 1011488 393526 325965 4.9764 ms
ron 0.12.2 12.534 ms 27.073 ms 25.085 ms 1607459 449158 349324 5.6759 ms
savefile 0.20.5 193.79 µs 2.1189 ms † 1045800 373139 311562 4.2223 ms
serde-zap 0.1.1 193.14 µs 2.1222 ms 515.45 µs 741295 303944 256422 3.4173 ms
wincode 0.6.2 191.41 µs 1.8207 ms 369.46 µs 1045784 373127 311553 4.3746 ms

Zero-copy deserialization speed

Crate Access Read Update
capnp:
capnp 0.27.2
64.650 ns* 1.0451 ms* 151.39 µs* ‡
flatbuffers 25.12.19 2.4940 ns* 2.0673 ms* 49.918 µs* 2.0601 ms* ‡
rkyv 0.8.18 1.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

Crate Serialize Deserialize Borrow Size Zlib Zstd Zstd Time
bilrost 0.1016.1 30.83%* 34.41%* 54.74% 7.01% 87.42% 87.80% 79.80% 63.69%
bin-proto 0.12.9 3.18% 31.41% † 67.29% 77.41% 72.96% 48.26%
bitcode 0.6.9 100.00% 100.00% 100.00% 100.00% 100.00% 100.00% 100.00%
borsh 1.8.1 27.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.19 13.95% † † 55.13% 61.64% 58.53% 49.37%
flexbuffers 25.12.19 2.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.0 28.69% 49.24% 4.40% 86.05% 86.82% 80.03% 59.39%
nanoserde 0.2.1 55.77% 69.33% † 67.29% 77.41% 72.96% 56.30%
postcard 1.1.3 35.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.18 58.12% 93.94%* 76.17%* † 69.57% 73.39% 69.74% 48.37%
ron 0.12.2 1.17% 5.40% 0.25% 43.78% 64.30% 65.07% 42.41%
savefile 0.20.5 75.46% 69.03% † 67.29% 77.40% 72.96% 57.01%
serde-zap 0.1.1 75.71% 68.92% 12.10% 94.93% 95.03% 88.65% 70.44%
wincode 0.6.2 76.40% 80.34% 16.88% 67.29% 77.41% 72.96% 55.03%

Zero-copy deserialization speed

Crate Access Read Update
capnp:
capnp 0.27.2
1.93%* 1.00%* 6.91%* ‡
flatbuffers 25.12.19 49.93%* 0.00%* 20.95%* 0.51%* ‡
rkyv 0.8.18 100.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

Crate Serialize Deserialize Size Zlib Zstd Zstd Time
bilrost 0.1016.1 6.8896 ms* 8.6870 ms* 7.7424 ms 8625005 6443961 6231572 72.266 ms
bin-proto 0.12.9 8.7296 ms 10.379 ms 6000008 5378500 5346908 8.6105 ms
bitcode 0.6.9 1.3867 ms 699.82 µs 6000006 5182295 4921841 13.203 ms
borsh 1.8.1 5.7577 ms 4.3384 ms 6000004 5378496 5346866 8.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 ms 44.877 ms 13125016 7524114 6757437 90.558 ms
cbor:
ciborium 0.2.2
67.789 ms 112.54 ms 13122324 7524660 6759128 92.242 ms
flatbuffers 25.12.19 470.18 µs † 6000024 5378434 5346878 8.5548 ms
flexbuffers 25.12.19 100.57 ms 77.696 ms 26609424 11901040 12486322 153.57 ms
json:
flexon 0.4.9
66.328 ms 53.131 ms 26192883 9566084 8584671 157.34 ms
json:
serde_json 1.0.151
86.367 ms 102.52 ms 26192883 9566084 8584671 156.90 ms
json:
simd-json 0.17.3
53.087 ms 73.007 ms 26192883 9566084 8584671 156.88 ms
messagepack:
msgpacker 0.7.1
648.11 µs 3.7468 ms 7500005 6058442 6014500 10.675 ms
messagepack:
rmp-serde 1.3.1
18.934 ms 12.914 ms 8125006 6494876 6391037 70.576 ms
messagepack:
zerompk 0.8.0
650.89 µs 3.1182 ms 8125006 6494876 6391037 70.151 ms
minicbor 2.3.0 6.0622 ms 11.642 ms 8125006 6494907 6390894 70.690 ms
nanoserde 0.2.1 1.7158 ms 873.29 µs 6000008 5378500 5346908 8.5022 ms
postcard 1.1.3 514.58 µs 6.5513 ms 6000003 5378495 5346897 8.9041 ms
protobuf:
buffa 0.9.2
8.9798 ms* 11.462 ms* 14.146 ms* 13.864 ms* 8750000 6665735 6421877 73.402 ms
protobuf:
prost 0.14.4
8.0827 ms* 8.8207 ms* 14.186 ms* 14.534 ms* 8750000 6665735 6421877 74.149 ms
protobuf:
protobuf 3.7.2
14.758 ms* 31.645 ms* 30.673 ms* 30.865 ms* 8750000 6665735 6421877 77.622 ms
protobuf:
protobuf 4.36.2-release
36.576 ms* 110.77 ms* 74.294 ms* 39.516 ms* 8750000 6665735 6421877 80.052 ms
rkyv 0.8.18 199.20 µs 182.57 µs* 221.60 µs* 6000008 5378500 5346872 8.4985 ms
ron 0.12.2 187.87 ms 565.27 ms 22192885 8970395 8137334 150.93 ms
savefile 0.20.5 194.08 µs 194.59 µs 6000024 5378519 5346896 8.9230 ms
serde-zap 0.1.1 484.91 µs 1.2157 ms 6000005 5378497 5346882 8.5801 ms
wincode 0.6.2 150.15 µs 191.07 µs 6000008 5378500 5346908 8.7498 ms

Zero-copy deserialization speed

Crate Access Read Update
capnp:
capnp 0.27.2
93.675 ns* 13.741 ms* 2.2570 ms* ‡
flatbuffers 25.12.19 2.4892 ns* 45.850 ns* 41.383 µs* 48.725 µs* ‡
rkyv 0.8.18 1.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

Crate Serialize Deserialize Size Zlib Zstd Zstd Time
bilrost 0.1016.1 2.18%* 1.73%* 2.36% 69.57% 80.42% 78.98% 11.76%
bin-proto 0.12.9 1.72% 1.76% 100.00% 96.35% 92.05% 98.70%
bitcode 0.6.9 10.83% 26.09% 100.00% 100.00% 100.00% 64.37%
borsh 1.8.1 2.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.19 31.93% † 100.00% 96.35% 92.05% 99.34%
flexbuffers 25.12.19 0.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.0 2.48% 1.57% 73.85% 79.79% 77.01% 12.02%
nanoserde 0.2.1 8.75% 20.91% 100.00% 96.35% 92.05% 99.96%
postcard 1.1.3 29.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.18 75.38% 100.00%* 82.39%* 100.00% 96.35% 92.05% 100.00%
ron 0.12.2 0.08% 0.03% 27.04% 57.77% 60.48% 5.63%
savefile 0.20.5 77.37% 93.82% 100.00% 96.35% 92.05% 95.24%
serde-zap 0.1.1 30.96% 15.02% 100.00% 96.35% 92.05% 99.05%
wincode 0.6.2 100.00% 95.55% 100.00% 96.35% 92.05% 97.13%

Zero-copy deserialization speed

Crate Access Read Update
capnp:
capnp 0.27.2
1.33%* 0.28%* 1.72%* ‡
flatbuffers 25.12.19 50.02%* 2.72%* 94.06%* 79.89%* ‡
rkyv 0.8.18 100.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

Crate Serialize Deserialize Borrow Size Zlib Zstd Zstd Time
bilrost 0.1016.1 881.98 µs* 809.11 µs* 3.2012 ms 1.7558 ms 489348 281173 249360 2.6886 ms
bin-proto 0.12.9 1.9704 ms 2.9371 ms † 566975 239350 231475 2.5091 ms
bitcode 0.6.9 127.79 µs 1.2824 ms 172.56 µs 327688 200947 182040 795.45 µs
borsh 1.8.1 522.01 µs 1.8263 ms † 446595 234236 209834 2.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 µs 4.7847 ms 3.6436 ms 1109831 344745 274333 3.5333 ms
cbor:
ciborium 0.2.2
3.7491 ms 10.219 ms † 1109821 344751 274345 3.5241 ms
flatbuffers 25.12.19 3.2549 ms † † 849472 347816 294871 3.5457 ms
flexbuffers 25.12.19 7.6868 ms 6.9206 ms 5.6118 ms 1187688 557642 553730 6.2992 ms
json:
flexon 0.4.9
2.3604 ms 4.4470 ms † 1623191 466527 359157 5.8095 ms
json:
serde_json 1.0.151
3.5385 ms 7.1952 ms † 1623191 466527 359157 6.0226 ms
json:
simd-json 0.17.3
2.2463 ms 4.7901 ms † 1623191 466527 359157 5.7474 ms
messagepack:
msgpacker 0.7.1
328.27 µs 2.7946 ms 1.3230 ms 391251 236877 220395 2.2171 ms
messagepack:
rmp-serde 1.3.1
1.4410 ms 2.9994 ms 1.7312 ms 424533 245214 226077 2.2912 ms
messagepack:
zerompk 0.8.0
357.73 µs 2.1267 ms 940.68 µs 416025 243812 224965 2.3481 ms
minicbor 2.3.0 583.09 µs 3.3520 ms 1.8772 ms 428773 249857 228630 2.3998 ms
nanoserde 0.2.1 273.46 µs 1.8829 ms † 567975 239930 231872 2.4657 ms
postcard 1.1.3 433.09 µs 2.1615 ms 830.80 µs 367489 221913 207244 2.0684 ms
protobuf:
buffa 0.9.2
1.0801 ms* 2.9089 ms* 3.2641 ms* 3.4547 ms* 2.4332 ms 596811 305319 268737 3.0603 ms
protobuf:
prost 0.14.4
1.2862 ms* 2.9817 ms* 3.5071 ms* 3.5972 ms* † 596811 305319 268737 3.0203 ms
protobuf:
protobuf 3.7.2
1.0677 ms* 3.0138 ms* 3.8551 ms* 4.0706 ms* † 596811 305319 268737 3.0548 ms
protobuf:
protobuf 4.36.2-release
1.7780 ms* 6.9994 ms* 6.8841 ms* 3.0254 ms* † 596811 305319 268737 3.0300 ms
rkyv 0.8.18 330.40 µs 1.5134 ms* 1.8609 ms* † 603776 254776 219421 2.4279 ms
ron 0.12.2 8.5386 ms 27.997 ms 27.039 ms 1465223 434935 342907 5.6057 ms
savefile 0.20.5 219.24 µs 1.9231 ms † 566991 239362 231478 2.4993 ms
serde-zap 0.1.1 227.56 µs 1.9675 ms 693.21 µs 367413 221291 206242 2.0717 ms
wincode 0.6.2 232.25 µs 1.7783 ms 555.15 µs 566975 239350 231475 2.5031 ms

Zero-copy deserialization speed

Crate Access Read Update
capnp:
capnp 0.27.2
63.631 ns* 591.29 µs* 414.57 ns* ‡
flatbuffers 25.12.19 2.4898 ns* 2.1132 ms* 1.3389 µs* 2.1287 ms* ‡
rkyv 0.8.18 1.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

Crate Serialize Deserialize Borrow Size Zlib Zstd Zstd Time
bilrost 0.1016.1 14.49%* 15.79%* 40.06% 9.83% 66.96% 71.47% 73.00% 29.59%
bin-proto 0.12.9 6.49% 43.66% † 57.80% 83.96% 78.64% 31.70%
bitcode 0.6.9 100.00% 100.00% 100.00% 100.00% 100.00% 100.00% 100.00%
borsh 1.8.1 24.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.19 3.93% † † 38.58% 57.77% 61.74% 22.43%
flexbuffers 25.12.19 1.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.0 21.92% 38.26% 9.19% 76.42% 80.42% 79.62% 33.15%
nanoserde 0.2.1 46.73% 68.11% † 57.69% 83.75% 78.51% 32.26%
postcard 1.1.3 29.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.18 38.68% 84.74%* 68.91%* † 54.27% 78.87% 82.96% 32.76%
ron 0.12.2 1.50% 4.58% 0.64% 22.36% 46.20% 53.09% 14.19%
savefile 0.20.5 58.29% 66.68% † 57.79% 83.95% 78.64% 31.83%
serde-zap 0.1.1 56.16% 65.18% 24.89% 89.19% 90.81% 88.27% 38.40%
wincode 0.6.2 55.02% 72.11% 31.08% 57.80% 83.96% 78.64% 31.78%

Zero-copy deserialization speed

Crate Access Read Update
capnp:
capnp 0.27.2
1.96%* 0.03%* 37.69%* ‡
flatbuffers 25.12.19 50.01%* 0.00%* 11.67%* 0.01%* ‡
rkyv 0.8.18 100.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

Crate Serialize Deserialize Size Zlib Zstd Zstd Time
bilrost 0.1016.1 4.5601 ms* 2.5698 ms* 8.4735 ms 1704643 1294259 1245668 11.794 ms
bin-proto 0.12.9 5.6653 ms 6.6314 ms 1791489 1127998 1051146 10.428 ms
bitcode 0.6.9 691.94 µs 2.3506 ms 971318 878034 850340 2.9487 ms
borsh 1.8.1 2.7122 ms 2.8687 ms 1521989 1108471 1038528 10.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 ms 19.581 ms 6012539 1695215 1464951 21.598 ms
cbor:
ciborium 0.2.2
23.167 ms 54.761 ms 6012373 1695146 1465025 21.573 ms
flatbuffers 25.12.19 4.9501 ms † 2325620 1439185 1268060 13.709 ms
flexbuffers 25.12.19 39.521 ms 37.105 ms 5352680 2658295 2777967 35.407 ms
json:
flexon 0.4.9
12.812 ms 22.583 ms 9390461 2391679 1842767 35.161 ms
json:
serde_json 1.0.151
19.186 ms 33.502 ms 9390461 2391679 1842767 35.093 ms
json:
simd-json 0.17.3
11.729 ms 27.082 ms 9390461 2391679 1842767 35.254 ms
messagepack:
msgpacker 0.7.1
962.24 µs 5.6712 ms 1458773 1156055 1137788 10.000 ms
messagepack:
rmp-serde 1.3.1
9.9663 ms 11.097 ms 1745322 1261627 1228923 11.748 ms
messagepack:
zerompk 0.8.0
1.1078 ms 4.7184 ms 1675866 1230968 1195006 11.214 ms
minicbor 2.3.0 2.3250 ms 11.741 ms 1777386 1276218 1252558 12.669 ms
nanoserde 0.2.1 1.2852 ms 2.8054 ms 1812404 1134820 1053109 10.328 ms
postcard 1.1.3 1.8012 ms 4.4540 ms 1311281 1083900 1041434 8.7862 ms
protobuf:
buffa 0.9.2
3.7747 ms* 8.3004 ms* 8.8019 ms* 9.9886 ms* 1859886 1338076 1295351 12.332 ms
protobuf:
prost 0.14.4
5.4524 ms* 9.3787 ms* 8.7450 ms* 9.5943 ms* 1859886 1338076 1295351 12.508 ms
protobuf:
protobuf 3.7.2
5.4508 ms* 12.712 ms* 11.967 ms* 12.816 ms* 1859886 1338076 1295351 12.550 ms
protobuf:
protobuf 4.36.2-release
8.6187 ms* 31.021 ms* 24.928 ms* 11.487 ms* 1859886 1338076 1295351 12.230 ms
rkyv 0.8.18 974.23 µs 2.1859 ms* 2.6585 ms* 2075936 1383779 1210377 13.149 ms
ron 0.12.2 46.035 ms 178.40 ms 8677703 2233642 1826180 34.948 ms
savefile 0.20.5 849.93 µs 2.8396 ms 1791505 1128012 1051153 10.288 ms
serde-zap 0.1.1 710.02 µs 4.3132 ms 1406257 1117802 1062438 9.5634 ms
wincode 0.6.2 640.25 µs 2.3017 ms 1791489 1127998 1051146 10.470 ms

Zero-copy deserialization speed

Crate Access Read Update
capnp:
capnp 0.27.2
68.530 ns* 2.0056 ms* 468.65 ns* ‡
flatbuffers 25.12.19 2.4900 ns* 6.2549 ms* 2.5762 µs* 5.4905 ms* ‡
rkyv 0.8.18 1.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

Crate Serialize Deserialize Size Zlib Zstd Zstd Time
bilrost 0.1016.1 14.04%* 24.91%* 25.80% 56.98% 67.84% 68.26% 25.00%
bin-proto 0.12.9 11.30% 32.96% 54.22% 77.84% 80.90% 28.28%
bitcode 0.6.9 92.53% 92.99% 100.00% 100.00% 100.00% 100.00%
borsh 1.8.1 23.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.19 12.93% † 41.77% 61.01% 67.06% 21.51%
flexbuffers 25.12.19 1.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.0 27.54% 18.62% 54.65% 68.80% 67.89% 23.27%
nanoserde 0.2.1 49.82% 77.92% 53.59% 77.37% 80.75% 28.55%
postcard 1.1.3 35.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.18 65.72% 100.00%* 82.22%* 46.79% 63.45% 70.25% 22.42%
ron 0.12.2 1.39% 1.23% 11.19% 39.31% 46.56% 8.44%
savefile 0.20.5 75.33% 76.98% 54.22% 77.84% 80.90% 28.66%
serde-zap 0.1.1 90.17% 50.68% 69.07% 78.55% 80.04% 30.83%
wincode 0.6.2 100.00% 94.97% 54.22% 77.84% 80.90% 28.16%

Zero-copy deserialization speed

Crate Access Read Update
capnp:
capnp 0.27.2
1.82%* 0.02%* 82.27%* ‡
flatbuffers 25.12.19 50.00%* 0.00%* 14.97%* 0.01%* ‡
rkyv 0.8.18 100.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)