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-08-21 21:37:06

Runtime info

rustc version

rustc 1.100.0-nightly (8925ea358 2026-08-20)
binary: rustc
commit-hash: 8925ea358a0f265ca61026aadc7ecc506c545cbe
commit-date: 2026-08-20
host: x86_64-unknown-linux-gnu
release: 1.100.0-nightly
LLVM version: 23.1.0

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.86
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.1015.0 443.14 µs* 418.68 µs* 2.5938 ms 854.26 µs 804955 328941 284849 3.6863 ms
bin-proto 0.12.8 4.5136 ms 4.6945 ms 1045784 373127 311553 5.0294 ms
bitcode 0.6.9 140.96 µs 1.4662 ms 59.998 µs 703710 288826 227322 2.5107 ms
borsh 1.8.0 550.63 µs 2.1558 ms 885780 362204 286248 4.1864 ms
capnp:
capnp 0.27.0
587.84 µs 1.4942 ms* 1443216 1046865* 513986 481681* 426532 458024* 6.3071 ms 5.4620 ms*
cbor:
cbor4ii 1.2.2
614.32 µs 5.0325 ms 3.5816 ms 1407835 403440 323561 4.7459 ms
cbor:
ciborium 0.2.2
4.1174 ms 12.106 ms 1407835 403440 323561 5.0269 ms
flatbuffers 25.12.19 1.0401 ms 1276368 468539 388381 4.9117 ms
flexbuffers 25.12.19 6.7869 ms 7.2365 ms 5.6387 ms 1829756 714318 691541 15.028 ms
json:
flexon 0.4.8
2.7574 ms 4.2182 ms 1827461 470560 360727 5.9997 ms
json:
serde_json 1.0.151
3.7104 ms 6.1769 ms 1827461 470560 360727 5.6001 ms
json:
simd-json 0.17.3
2.0827 ms 4.8108 ms 1827461 470560 360727 5.5075 ms
messagepack:
msgpacker 0.7.1
345.74 µs 2.5831 ms 955.95 µs 764996 315291 264212 3.5557 ms
messagepack:
rmp-serde 1.3.1
1.4826 ms 3.1795 ms 1.5277 ms 784997 325384 277608 3.8169 ms
messagepack:
zerompk 0.7.1
370.24 µs 2.1474 ms 679.05 µs 784997 325384 277608 3.9156 ms
minicbor 2.3.0 478.22 µs 2.9687 ms 1.3744 ms 817830 332671 284034 4.1677 ms
nanoserde 0.2.1 262.66 µs 2.0880 ms 1045784 373127 311553 4.1226 ms
postcard 1.1.3 423.06 µs 2.2683 ms 678.87 µs 724953 302399 252968 3.2263 ms
protobuf:
buffa 0.9.1
904.72 µs* 2.3891 ms* 3.1559 ms* 3.3515 ms* 1.7513 ms 884628 363130 314959 4.4342 ms
protobuf:
prost 0.14.4
949.65 µs* 2.4915 ms* 3.4183 ms* 3.4836 ms* 884628 363130 314959 4.6950 ms
protobuf:
protobuf 3.7.2
1.1942 ms* 3.0257 ms* 4.0249 ms* 4.0036 ms* 884628 363130 314959 4.7825 ms
protobuf:
protobuf 4.35.1-release
1.6699 ms* 7.4644 ms* 7.4883 ms* 2.9341 ms* 884628 363130 314959 4.7839 ms
rkyv 0.8.18 248.79 µs 1.5598 ms* 1.9102 ms* 1011488 393526 325965 4.5593 ms
ron 0.12.2 12.277 ms 28.126 ms 25.721 ms 1607459 449158 349324 5.5792 ms
savefile 0.20.5 193.91 µs 2.1032 ms 1045800 373139 311562 4.2254 ms
serde-zap 0.1.0 200.76 µs 2.1884 ms 498.63 µs 741295 303944 256422 3.8464 ms
wincode 0.6.0 205.75 µs 1.7737 ms 367.47 µs 1045784 373127 311553 4.2857 ms

Zero-copy deserialization speed

Crate Access Read Update
capnp:
capnp 0.27.0
76.631 ns* 1.0569 ms* 173.96 µs*
flatbuffers 25.12.19 2.4899 ns* 2.1152 ms* 50.118 µs* 2.1995 ms*
rkyv 0.8.18 1.2469 ns* 343.31 µs* 10.494 µs* 353.48 µs* 7.7899 µs*

Comparison

Relative to best. Higher is better.

Serialize / deserialize speed and size

Crate Serialize Deserialize Borrow Size Zlib Zstd Zstd Time
bilrost 0.1015.0 31.81%* 33.67%* 56.53% 7.02% 87.42% 87.80% 79.80% 68.11%
bin-proto 0.12.8 3.12% 31.23% 67.29% 77.41% 72.96% 49.92%
bitcode 0.6.9 100.00% 100.00% 100.00% 100.00% 100.00% 100.00% 100.00%
borsh 1.8.0 25.60% 68.01% 79.45% 79.74% 79.41% 59.97%
capnp:
capnp 0.27.0
23.98% 9.43%* 48.76% 67.22%* 56.19% 59.96%* 53.30% 49.63%* 39.81% 45.97%*
cbor:
cbor4ii 1.2.2
22.95% 29.13% 1.68% 49.99% 71.59% 70.26% 52.90%
cbor:
ciborium 0.2.2
3.42% 12.11% 49.99% 71.59% 70.26% 49.95%
flatbuffers 25.12.19 13.55% 55.13% 61.64% 58.53% 51.12%
flexbuffers 25.12.19 2.08% 20.26% 1.06% 38.46% 40.43% 32.87% 16.71%
json:
flexon 0.4.8
5.11% 34.76% 38.51% 61.38% 63.02% 41.85%
json:
serde_json 1.0.151
3.80% 23.74% 38.51% 61.38% 63.02% 44.83%
json:
simd-json 0.17.3
6.77% 30.48% 38.51% 61.38% 63.02% 45.59%
messagepack:
msgpacker 0.7.1
40.77% 56.76% 6.28% 91.99% 91.61% 86.04% 70.61%
messagepack:
rmp-serde 1.3.1
9.51% 46.11% 3.93% 89.64% 88.76% 81.89% 65.78%
messagepack:
zerompk 0.7.1
38.07% 68.28% 8.84% 89.64% 88.76% 81.89% 64.12%
minicbor 2.3.0 29.48% 49.39% 4.37% 86.05% 86.82% 80.03% 60.24%
nanoserde 0.2.1 53.67% 70.22% 67.29% 77.41% 72.96% 60.90%
postcard 1.1.3 33.32% 64.64% 8.84% 97.07% 95.51% 89.86% 77.82%
protobuf:
buffa 0.9.1
15.58%* 5.90%* 46.46%* 43.75%* 3.43% 79.55% 79.54% 72.18% 56.62%
protobuf:
prost 0.14.4
14.84%* 5.66%* 42.89%* 42.09%* 79.55% 79.54% 72.18% 53.48%
protobuf:
protobuf 3.7.2
11.80%* 4.66%* 36.43%* 36.62%* 79.55% 79.54% 72.18% 52.50%
protobuf:
protobuf 4.35.1-release
8.44%* 1.89%* 19.58%* 49.97%* 79.55% 79.54% 72.18% 52.48%
rkyv 0.8.18 56.66% 94.00%* 76.76%* 69.57% 73.39% 69.74% 55.07%
ron 0.12.2 1.15% 5.21% 0.23% 43.78% 64.30% 65.07% 45.00%
savefile 0.20.5 72.69% 69.71% 67.29% 77.40% 72.96% 59.42%
serde-zap 0.1.0 70.21% 67.00% 12.03% 94.93% 95.03% 88.65% 65.27%
wincode 0.6.0 68.51% 82.66% 16.33% 67.29% 77.41% 72.96% 58.58%

Zero-copy deserialization speed

Crate Access Read Update
capnp:
capnp 0.27.0
1.63%* 0.99%* 6.03%*
flatbuffers 25.12.19 50.08%* 0.00%* 20.94%* 0.48%*
rkyv 0.8.18 100.00%* 0.00%* 100.00%* 2.97%* 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.1015.0 7.3832 ms* 8.7249 ms* 7.5820 ms 8625005 6443961 6231572 72.525 ms
bin-proto 0.12.8 8.8497 ms 10.661 ms 6000008 5378500 5346908 8.5562 ms
bitcode 0.6.9 1.2947 ms 689.62 µs 6000006 5182295 4921841 13.313 ms
borsh 1.8.0 6.0630 ms 4.1522 ms 6000004 5378496 5346866 9.1178 ms
capnp:
capnp 0.27.0
8.7854 ms 20.047 ms* 14000088 10401737* 7130367 7308001* 6046182 7922110* 80.588 ms 66.710 ms*
cbor:
cbor4ii 1.2.2
8.7529 ms 44.867 ms 13125016 7524114 6757437 90.109 ms
cbor:
ciborium 0.2.2
69.397 ms 113.36 ms 13122324 7524660 6759128 91.582 ms
flatbuffers 25.12.19 521.83 µs 6000024 5378434 5346878 8.6254 ms
flexbuffers 25.12.19 102.78 ms 78.159 ms 26609424 11901040 12486322 151.39 ms
json:
flexon 0.4.8
68.762 ms 58.037 ms 26192883 9566084 8584671 156.79 ms
json:
serde_json 1.0.151
86.382 ms 103.59 ms 26192883 9566084 8584671 154.36 ms
json:
simd-json 0.17.3
53.187 ms 67.970 ms 26192883 9566084 8584671 169.35 ms
messagepack:
msgpacker 0.7.1
654.59 µs 3.8297 ms 7500005 6058442 6014500 10.355 ms
messagepack:
rmp-serde 1.3.1
19.735 ms 12.577 ms 8125006 6494876 6391037 69.297 ms
messagepack:
zerompk 0.7.1
775.04 µs 1.4708 ms 8125006 6494876 6391037 69.280 ms
minicbor 2.3.0 5.1928 ms 11.599 ms 8125006 6494907 6390894 69.258 ms
nanoserde 0.2.1 1.6248 ms 844.17 µs 6000008 5378500 5346908 8.5696 ms
postcard 1.1.3 482.30 µs 6.6993 ms 6000003 5378495 5346897 8.6962 ms
protobuf:
buffa 0.9.1
9.0780 ms* 11.368 ms* 14.231 ms* 14.024 ms* 8750000 6665735 6421877 72.388 ms
protobuf:
prost 0.14.4
7.8306 ms* 8.4460 ms* 11.039 ms* 11.809 ms* 8750000 6665735 6421877 73.114 ms
protobuf:
protobuf 3.7.2
15.417 ms* 32.723 ms* 28.647 ms* 28.944 ms* 8750000 6665735 6421877 76.807 ms
protobuf:
protobuf 4.35.1-release
37.949 ms* 110.65 ms* 69.888 ms* 36.676 ms* 8750000 6665735 6421877 78.012 ms
rkyv 0.8.18 149.00 µs 200.14 µs* 199.83 µs* 6000008 5378500 5346872 8.5433 ms
ron 0.12.2 195.66 ms 580.32 ms 22192885 8970395 8137334 151.99 ms
savefile 0.20.5 149.15 µs 150.16 µs 6000024 5378519 5346896 8.5823 ms
serde-zap 0.1.0 496.60 µs 1.1796 ms 6000005 5378497 5346882 8.5474 ms
wincode 0.6.0 199.39 µs 149.30 µs 6000008 5378500 5346908 8.8420 ms

Zero-copy deserialization speed

Crate Access Read Update
capnp:
capnp 0.27.0
106.39 ns* 13.835 ms* 2.2105 ms*
flatbuffers 25.12.19 2.4904 ns* 44.800 ns* 41.425 µs* 48.705 µs*
rkyv 0.8.18 1.2459 ns* 5.6093 ns* 38.910 µs* 38.922 µs* 77.622 µs*

Comparison

Relative to best. Higher is better.

Serialize / deserialize speed and size

Crate Serialize Deserialize Size Zlib Zstd Zstd Time
bilrost 0.1015.0 2.02%* 1.71%* 1.97% 69.57% 80.42% 78.98% 11.78%
bin-proto 0.12.8 1.68% 1.40% 100.00% 96.35% 92.05% 99.85%
bitcode 0.6.9 11.51% 21.65% 100.00% 100.00% 100.00% 64.17%
borsh 1.8.0 2.46% 3.60% 100.00% 96.35% 92.05% 93.70%
capnp:
capnp 0.27.0
1.70% 0.74%* 42.86% 57.68%* 72.68% 70.91%* 81.40% 62.13%* 10.60% 12.81%*
cbor:
cbor4ii 1.2.2
1.70% 0.33% 45.71% 68.88% 72.84% 9.48%
cbor:
ciborium 0.2.2
0.21% 0.13% 45.72% 68.87% 72.82% 9.33%
flatbuffers 25.12.19 28.55% 100.00% 96.35% 92.05% 99.05%
flexbuffers 25.12.19 0.14% 0.19% 22.55% 43.54% 39.42% 5.64%
json:
flexon 0.4.8
0.22% 0.26% 22.91% 54.17% 57.33% 5.45%
json:
serde_json 1.0.151
0.17% 0.14% 22.91% 54.17% 57.33% 5.53%
json:
simd-json 0.17.3
0.28% 0.22% 22.91% 54.17% 57.33% 5.04%
messagepack:
msgpacker 0.7.1
22.76% 3.90% 80.00% 85.54% 81.83% 82.50%
messagepack:
rmp-serde 1.3.1
0.76% 1.19% 73.85% 79.79% 77.01% 12.33%
messagepack:
zerompk 0.7.1
19.22% 10.15% 73.85% 79.79% 77.01% 12.33%
minicbor 2.3.0 2.87% 1.29% 73.85% 79.79% 77.01% 12.34%
nanoserde 0.2.1 9.17% 17.69% 100.00% 96.35% 92.05% 99.69%
postcard 1.1.3 30.89% 2.23% 100.00% 96.35% 92.05% 98.24%
protobuf:
buffa 0.9.1
1.64%* 1.31%* 1.05%* 1.06%* 68.57% 77.75% 76.64% 11.80%
protobuf:
prost 0.14.4
1.90%* 1.76%* 1.35%* 1.26%* 68.57% 77.75% 76.64% 11.68%
protobuf:
protobuf 3.7.2
0.97%* 0.46%* 0.52%* 0.52%* 68.57% 77.75% 76.64% 11.12%
protobuf:
protobuf 4.35.1-release
0.39%* 0.13%* 0.21%* 0.41%* 68.57% 77.75% 76.64% 10.95%
rkyv 0.8.18 100.00% 74.60%* 74.71%* 100.00% 96.35% 92.05% 100.00%
ron 0.12.2 0.08% 0.03% 27.04% 57.77% 60.48% 5.62%
savefile 0.20.5 99.90% 99.43% 100.00% 96.35% 92.05% 99.55%
serde-zap 0.1.0 30.00% 12.66% 100.00% 96.35% 92.05% 99.95%
wincode 0.6.0 74.73% 100.00% 100.00% 96.35% 92.05% 96.62%

Zero-copy deserialization speed

Crate Access Read Update
capnp:
capnp 0.27.0
1.17%* 0.28%* 1.76%*
flatbuffers 25.12.19 50.03%* 2.78%* 93.93%* 79.89%*
rkyv 0.8.18 100.00%* 22.21%* 100.00%* 99.97%* 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.1015.0 869.44 µs* 809.63 µs* 3.1968 ms 1.7363 ms 489348 281173 249360 2.6540 ms
bin-proto 0.12.8 1.9222 ms 2.9232 ms 566975 239350 231475 2.4707 ms
bitcode 0.6.9 123.49 µs 1.2758 ms 169.58 µs 327688 200947 182040 761.38 µs
borsh 1.8.0 536.02 µs 1.8107 ms 446595 234236 209834 2.0991 ms
capnp:
capnp 0.27.0
474.98 µs 1.0360 ms* 803896 489017* 335606 293127* 280744 271528* 3.5888 ms 2.6140 ms*
cbor:
cbor4ii 1.2.2
725.34 µs 4.9175 ms 3.7854 ms 1109831 344745 274333 3.4817 ms
cbor:
ciborium 0.2.2
3.8517 ms 10.150 ms 1109821 344751 274345 3.6909 ms
flatbuffers 25.12.19 3.3017 ms 849472 347816 294871 3.5310 ms
flexbuffers 25.12.19 7.8698 ms 7.0888 ms 5.7036 ms 1187688 557642 553730 6.2525 ms
json:
flexon 0.4.8
2.7946 ms 4.9662 ms 1623191 466527 359157 5.8228 ms
json:
serde_json 1.0.151
3.5444 ms 7.4156 ms 1623191 466527 359157 5.8012 ms
json:
simd-json 0.17.3
2.2297 ms 4.7943 ms 1623191 466527 359157 5.7162 ms
messagepack:
msgpacker 0.7.1
326.60 µs 2.8180 ms 1.3002 ms 391251 236877 220395 2.2296 ms
messagepack:
rmp-serde 1.3.1
1.4542 ms 3.0470 ms 1.7024 ms 424533 245214 226077 2.2423 ms
messagepack:
zerompk 0.7.1
333.02 µs 2.1259 ms 937.84 µs 416025 243812 224965 2.3349 ms
minicbor 2.3.0 572.67 µs 3.4181 ms 1.8558 ms 428773 249857 228630 2.3084 ms
nanoserde 0.2.1 267.01 µs 1.8766 ms 567975 239930 231872 2.5361 ms
postcard 1.1.3 449.50 µs 2.0485 ms 822.17 µs 367489 221913 207244 2.0320 ms
protobuf:
buffa 0.9.1
1.0880 ms* 2.9099 ms* 3.2626 ms* 3.4586 ms* 2.4373 ms 596811 305319 268737 2.9987 ms
protobuf:
prost 0.14.4
1.3041 ms* 3.1290 ms* 3.5749 ms* 3.6371 ms* 596811 305319 268737 3.1380 ms
protobuf:
protobuf 3.7.2
1.1036 ms* 3.0420 ms* 3.7951 ms* 4.0373 ms* 596811 305319 268737 3.0964 ms
protobuf:
protobuf 4.35.1-release
1.7381 ms* 6.8803 ms* 6.8729 ms* 3.0558 ms* 596811 305319 268737 2.9967 ms
rkyv 0.8.18 327.32 µs 1.5069 ms* 1.8567 ms* 603776 254776 219421 2.3584 ms
ron 0.12.2 8.2689 ms 28.873 ms 26.936 ms 1465223 434935 342907 5.6747 ms
savefile 0.20.5 215.72 µs 1.8959 ms 566991 239362 231478 2.4654 ms
serde-zap 0.1.0 231.55 µs 1.9615 ms 667.74 µs 367413 221291 206242 2.1041 ms
wincode 0.6.0 243.43 µs 1.6316 ms 533.15 µs 566975 239350 231475 2.5389 ms

Zero-copy deserialization speed

Crate Access Read Update
capnp:
capnp 0.27.0
75.893 ns* 599.69 µs* 425.06 ns*
flatbuffers 25.12.19 2.4912 ns* 2.1674 ms* 1.3488 µs* 2.1521 ms*
rkyv 0.8.18 1.2458 ns* 329.18 µs* 156.31 ns* 329.09 µs* 732.82 ns*

Comparison

Relative to best. Higher is better.

Serialize / deserialize speed and size

Crate Serialize Deserialize Borrow Size Zlib Zstd Zstd Time
bilrost 0.1015.0 14.20%* 15.25%* 39.91% 9.77% 66.96% 71.47% 73.00% 28.69%
bin-proto 0.12.8 6.42% 43.64% 57.80% 83.96% 78.64% 30.82%
bitcode 0.6.9 100.00% 100.00% 100.00% 100.00% 100.00% 100.00% 100.00%
borsh 1.8.0 23.04% 70.46% 73.37% 85.79% 86.75% 36.27%
capnp:
capnp 0.27.0
26.00% 11.92%* 40.76% 67.01%* 59.88% 68.55%* 64.84% 67.04%* 21.22% 29.13%*
cbor:
cbor4ii 1.2.2
17.03% 25.94% 4.48% 29.53% 58.29% 66.36% 21.87%
cbor:
ciborium 0.2.2
3.21% 12.57% 29.53% 58.29% 66.35% 20.63%
flatbuffers 25.12.19 3.74% 38.58% 57.77% 61.74% 21.56%
flexbuffers 25.12.19 1.57% 18.00% 2.97% 27.59% 36.04% 32.88% 12.18%
json:
flexon 0.4.8
4.42% 25.69% 20.19% 43.07% 50.69% 13.08%
json:
serde_json 1.0.151
3.48% 17.20% 20.19% 43.07% 50.69% 13.12%
json:
simd-json 0.17.3
5.54% 26.61% 20.19% 43.07% 50.69% 13.32%
messagepack:
msgpacker 0.7.1
37.81% 45.27% 13.04% 83.75% 84.83% 82.60% 34.15%
messagepack:
rmp-serde 1.3.1
8.49% 41.87% 9.96% 77.19% 81.95% 80.52% 33.96%
messagepack:
zerompk 0.7.1
37.08% 60.01% 18.08% 78.77% 82.42% 80.92% 32.61%
minicbor 2.3.0 21.56% 37.32% 9.14% 76.42% 80.42% 79.62% 32.98%
nanoserde 0.2.1 46.25% 67.98% 57.69% 83.75% 78.51% 30.02%
postcard 1.1.3 27.47% 62.28% 20.63% 89.17% 90.55% 87.84% 37.47%
protobuf:
buffa 0.9.1
11.35%* 4.24%* 39.10%* 36.89%* 6.96% 54.91% 65.82% 67.74% 25.39%
protobuf:
prost 0.14.4
9.47%* 3.95%* 35.69%* 35.08%* 54.91% 65.82% 67.74% 24.26%
protobuf:
protobuf 3.7.2
11.19%* 4.06%* 33.62%* 31.60%* 54.91% 65.82% 67.74% 24.59%
protobuf:
protobuf 4.35.1-release
7.10%* 1.79%* 18.56%* 41.75%* 54.91% 65.82% 67.74% 25.41%
rkyv 0.8.18 37.73% 84.66%* 68.71%* 54.27% 78.87% 82.96% 32.28%
ron 0.12.2 1.49% 4.42% 0.63% 22.36% 46.20% 53.09% 13.42%
savefile 0.20.5 57.25% 67.29% 57.79% 83.95% 78.64% 30.88%
serde-zap 0.1.0 53.33% 65.04% 25.40% 89.19% 90.81% 88.27% 36.19%
wincode 0.6.0 50.73% 78.19% 31.81% 57.80% 83.96% 78.64% 29.99%

Zero-copy deserialization speed

Crate Access Read Update
capnp:
capnp 0.27.0
1.64%* 0.03%* 36.77%*
flatbuffers 25.12.19 50.01%* 0.00%* 11.59%* 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.1015.0 4.5704 ms* 2.5966 ms* 8.4997 ms 1704643 1294259 1245668 11.914 ms
bin-proto 0.12.8 5.9665 ms 6.5080 ms 1791489 1127998 1051146 10.603 ms
bitcode 0.6.9 699.44 µs 2.3623 ms 971318 878034 850340 3.0479 ms
borsh 1.8.0 2.9708 ms 2.8412 ms 1521989 1108471 1038528 10.186 ms
capnp:
capnp 0.27.0
2.6388 ms 4.5152 ms* 2724288 1616255* 1546992 1278764* 1239111 1125654* 14.561 ms 8.6932 ms*
cbor:
cbor4ii 1.2.2
2.8895 ms 19.285 ms 6012539 1695215 1464951 21.269 ms
cbor:
ciborium 0.2.2
24.199 ms 54.178 ms 6012373 1695146 1465025 21.465 ms
flatbuffers 25.12.19 5.1374 ms 2325620 1439185 1268060 13.472 ms
flexbuffers 25.12.19 40.562 ms 37.204 ms 5352680 2658295 2777967 35.069 ms
json:
flexon 0.4.8
14.922 ms 25.360 ms 9390461 2391679 1842767 35.165 ms
json:
serde_json 1.0.151
18.940 ms 33.896 ms 9390461 2391679 1842767 34.998 ms
json:
simd-json 0.17.3
11.917 ms 27.086 ms 9390461 2391679 1842767 35.394 ms
messagepack:
msgpacker 0.7.1
943.05 µs 5.6361 ms 1458773 1156055 1137788 9.9443 ms
messagepack:
rmp-serde 1.3.1
10.427 ms 10.769 ms 1745322 1261627 1228923 11.669 ms
messagepack:
zerompk 0.7.1
1.1052 ms 4.5698 ms 1675866 1230968 1195006 11.042 ms
minicbor 2.3.0 2.2578 ms 11.698 ms 1777386 1276218 1252558 12.904 ms
nanoserde 0.2.1 1.2966 ms 2.8196 ms 1812404 1134820 1053109 10.496 ms
postcard 1.1.3 1.7358 ms 4.4829 ms 1311281 1083900 1041434 8.7673 ms
protobuf:
buffa 0.9.1
3.5539 ms* 8.0401 ms* 9.0006 ms* 10.210 ms* 1859886 1338076 1295351 12.298 ms
protobuf:
prost 0.14.4
5.4395 ms* 9.3762 ms* 9.0717 ms* 9.8162 ms* 1859886 1338076 1295351 12.563 ms
protobuf:
protobuf 3.7.2
5.5462 ms* 12.888 ms* 12.145 ms* 13.020 ms* 1859886 1338076 1295351 12.651 ms
protobuf:
protobuf 4.35.1-release
9.2739 ms* 33.060 ms* 24.541 ms* 10.920 ms* 1859886 1338076 1295351 12.584 ms
rkyv 0.8.18 968.98 µs 2.1860 ms* 2.6418 ms* 2075936 1383779 1210377 13.136 ms
ron 0.12.2 41.955 ms 183.04 ms 8677703 2233642 1826180 34.512 ms
savefile 0.20.5 863.66 µs 2.8299 ms 1791505 1128012 1051153 10.335 ms
serde-zap 0.1.0 750.26 µs 4.2909 ms 1406257 1117802 1062438 9.6193 ms
wincode 0.6.0 628.32 µs 2.2780 ms 1791489 1127998 1051146 10.359 ms

Zero-copy deserialization speed

Crate Access Read Update
capnp:
capnp 0.27.0
80.167 ns* 2.0216 ms* 484.20 ns*
flatbuffers 25.12.19 2.4895 ns* 5.4678 ms* 2.5713 µs* 5.5747 ms*
rkyv 0.8.18 1.2446 ns* 439.79 µs* 385.57 ns* 441.59 µs* 236.78 ns*

Comparison

Relative to best. Higher is better.

Serialize / deserialize speed and size

Crate Serialize Deserialize Size Zlib Zstd Zstd Time
bilrost 0.1015.0 13.75%* 24.20%* 25.72% 56.98% 67.84% 68.26% 25.58%
bin-proto 0.12.8 10.53% 33.59% 54.22% 77.84% 80.90% 28.75%
bitcode 0.6.9 89.83% 92.54% 100.00% 100.00% 100.00% 100.00%
borsh 1.8.0 21.15% 76.94% 63.82% 79.21% 81.88% 29.92%
capnp:
capnp 0.27.0
23.81% 13.92%* 35.65% 60.10%* 56.76% 68.66%* 68.63% 75.54%* 20.93% 35.06%*
cbor:
cbor4ii 1.2.2
21.74% 11.34% 16.15% 51.79% 58.05% 14.33%
cbor:
ciborium 0.2.2
2.60% 4.03% 16.16% 51.80% 58.04% 14.20%
flatbuffers 25.12.19 12.23% 41.77% 61.01% 67.06% 22.62%
flexbuffers 25.12.19 1.55% 5.88% 18.15% 33.03% 30.61% 8.69%
json:
flexon 0.4.8
4.21% 8.62% 10.34% 36.71% 46.14% 8.67%
json:
serde_json 1.0.151
3.32% 6.45% 10.34% 36.71% 46.14% 8.71%
json:
simd-json 0.17.3
5.27% 8.07% 10.34% 36.71% 46.14% 8.61%
messagepack:
msgpacker 0.7.1
66.63% 38.79% 66.58% 75.95% 74.74% 30.65%
messagepack:
rmp-serde 1.3.1
6.03% 20.30% 55.65% 69.60% 69.19% 26.12%
messagepack:
zerompk 0.7.1
56.85% 47.84% 57.96% 71.33% 71.16% 27.60%
minicbor 2.3.0 27.83% 18.69% 54.65% 68.80% 67.89% 23.62%
nanoserde 0.2.1 48.46% 77.53% 53.59% 77.37% 80.75% 29.04%
postcard 1.1.3 36.20% 48.76% 74.07% 81.01% 81.65% 34.76%
protobuf:
buffa 0.9.1
17.68%* 7.81%* 24.29%* 21.41%* 52.22% 65.62% 65.65% 24.78%
protobuf:
prost 0.14.4
11.55%* 6.70%* 24.10%* 22.27%* 52.22% 65.62% 65.65% 24.26%
protobuf:
protobuf 3.7.2
11.33%* 4.88%* 18.00%* 16.79%* 52.22% 65.62% 65.65% 24.09%
protobuf:
protobuf 4.35.1-release
6.78%* 1.90%* 8.91%* 20.02%* 52.22% 65.62% 65.65% 24.22%
rkyv 0.8.18 64.84% 100.00%* 82.75%* 46.79% 63.45% 70.25% 23.20%
ron 0.12.2 1.50% 1.19% 11.19% 39.31% 46.56% 8.83%
savefile 0.20.5 72.75% 77.25% 54.22% 77.84% 80.90% 29.49%
serde-zap 0.1.0 83.75% 50.95% 69.07% 78.55% 80.04% 31.69%
wincode 0.6.0 100.00% 95.96% 54.22% 77.84% 80.90% 29.42%

Zero-copy deserialization speed

Crate Access Read Update
capnp:
capnp 0.27.0
1.55%* 0.02%* 79.63%*
flatbuffers 25.12.19 49.99%* 0.00%* 15.00%* 0.01%*
rkyv 0.8.18 100.00%* 0.00%* 100.00%* 0.09%* 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)