Skip to content

djkoloski/rust_serialization_benchmark

Repository files navigation

Rust serialization benchmark

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

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.

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. Other footnotes are located at the bottom.

Last updated: 2026-01-13 14:50:57

Runtime info

rustc version

rustc 1.94.0-nightly (2f1bd3f37 2026-01-12)
binary: rustc
commit-hash: 2f1bd3f3781c90a8447e37d65a898442b8618895
commit-date: 2026-01-12
host: x86_64-unknown-linux-gnu
release: 1.94.0-nightly
LLVM version: 21.1.8

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 Itlb multihit:          Not affected
Vulnerability L1tf:                   Not affected
Vulnerability Mds:                    Not affected
Vulnerability Meltdown:               Not affected
Vulnerability Mmio stale data:        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 Tsx async abort:        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.1013.0 447.76 µs* 410.14 µs* 2.5949 ms 865.44 µs 804955 328941 284849 4.1406 ms
bin-proto 0.12.3 4.3070 ms 4.9015 ms 1045784 373127 311553 4.4272 ms
bincode 2.0.1 382.28 µs 2.3543 ms 681.72 µs 741295 303944 256422 3.5544 ms
bincode 1.3.3 549.33 µs 2.0543 ms 592.61 µs 1045784 373127 311553 4.4595 ms
bitcode 0.6.6 138.72 µs 1.4388 ms 59.374 µs 703710 288826 227322 2.4964 ms
borsh 1.5.7 551.54 µs 2.2016 ms 885780 362204 286248 3.8501 ms
capnp 0.23.2 454.45 µs 1443216 513986 426532 6.2140 ms
cbor:
cbor4ii 1.0.0
662.50 µs 4.9803 ms 3.3815 ms 1407835 403440 323561 5.0309 ms
cbor:
ciborium 0.2.2
4.0231 ms 11.364 ms 1407835 403440 323561 5.0195 ms
cbor:
serde_cbor 0.11.2
2.0991 ms 4.9722 ms 3.1112 ms 1407835 403440 323561 4.7112 ms
columnar 0.11.0 248.67 µs 2.2355 ms 810.57 µs* 1045928 370212 293907 4.2218 ms
databuf 0.5.0 275.25 µs 2.0345 ms 668.40 µs 765778 311715 263914 3.4533 ms
dlhn 0.1.7 730.31 µs 2.5801 ms 724953 301446 253056 3.1850 ms
flatbuffers 25.12.19 1.0336 ms 1276368 468539 388381 4.7909 ms
flexbuffers 25.2.10 7.2837 ms 7.3589 ms 5.6318 ms 1829756 714318 691541 8.5473 ms
json:
serde_json 1.0.140
3.5731 ms 6.0853 ms 1827461 470560 360727 5.4682 ms
json:
simd-json 0.15.1
2.2173 ms 4.6245 ms 1827461 470560 360727 5.4158 ms
messagepack:
msgpacker 0.4.8
1.3892 ms 2.5574 ms 764996 315291 264212 3.5082 ms
messagepack:
rmp-serde 1.3.0
1.5240 ms 3.1151 ms 1.4319 ms 784997 325384 277608 3.7357 ms
minicbor 1.0.0 473.61 µs 3.0824 ms 1.4233 ms 817830 332671 284034 3.9569 ms
nachricht-serde 0.4.0 5.3605 ms 4.5444 ms 3.1091 ms 818669 332556 284797 3.9303 ms
nanoserde 0.2.1 258.86 µs 2.1687 ms 1045784 373127 311553 4.1504 ms
nibblecode 0.1.0 186.88 µs 1011487 473996 404668 5.2316 ms
postcard 1.1.1 430.08 µs 2.2392 ms 618.23 µs 724953 302399 252968 3.1634 ms
pot 3.0.1 2.2821 ms 6.6605 ms 4.9063 ms 971922 372513 303636 4.3739 ms
protobuf:
prost 0.14.1
935.19 µs* 2.4439 ms* 3.4643 ms 884628 363130 314959 4.3609 ms
protobuf:
protobuf 3.7.2
1.2074 ms* 3.0078 ms* 3.8523 ms 884628 363130 314959 4.7579 ms
rkyv 0.8.10 249.15 µs 1.5422 ms* 1.9095 ms* 1011488 393526 325965 4.5659 ms
ron 0.10.1 11.719 ms 23.554 ms 21.541 ms 1607459 449158 349324 5.5170 ms
savefile 0.18.6 193.40 µs 2.1505 ms 1045800 373139 311562 4.1885 ms
scale:
parity-scale-codec 3.7.5
671.17 µs 2.4765 ms 765778 311743 263822 3.4824 ms
serde-brief 0.1.1 1.6621 ms 4.8979 ms 2.9857 ms 1584946 413733 339964 4.8211 ms
serde_bare 0.5.0 694.72 µs 2.1798 ms 765778 311715 263914 3.4826 ms
speedy 0.8.7 200.59 µs 1.7734 ms 388.39 µs 885780 362204 286248 3.8198 ms
wincode 0.2.4 174.61 µs 2.0056 ms 465.75 µs 1045784 373127 311553 4.2067 ms
wiring 0.2.4 194.18 µs 2.0299 ms 1045784 337930 275808 3.6430 ms

Zero-copy deserialization speed

Crate Access Read Update
capnp 0.23.2 82.015 ns* 191.25 µs*
columnar 0.11.0 20.516 ns
flatbuffers 25.12.19 2.4867 ns* 2.0986 ms* 51.336 µs* 2.1150 ms*
nibblecode 0.1.0 1.2431 ns* 266.03 µs* 10.390 µs* 277.50 µs* 7.4679 µs*
rkyv 0.8.10 1.2427 ns* 370.29 µs* 10.334 µs* 380.31 µs* 7.6027 µs*

Comparison

Relative to best. Higher is better.

Serialize / deserialize speed and size

Crate Serialize Deserialize Borrow Size Zlib Zstd Zstd Time
bilrost 0.1013.0 30.98%* 33.82%* 31.24% 6.86% 87.42% 87.80% 79.80% 60.29%
bin-proto 0.12.3 3.22% 16.54% 67.29% 77.41% 72.96% 56.39%
bincode 2.0.1 36.29% 34.43% 8.71% 94.93% 95.03% 88.65% 70.23%
bincode 1.3.3 25.25% 39.46% 10.02% 67.29% 77.41% 72.96% 55.98%
bitcode 0.6.6 100.00% 56.34% 100.00% 100.00% 100.00% 100.00% 100.00%
borsh 1.5.7 25.15% 36.82% 79.45% 79.74% 79.41% 64.84%
capnp 0.23.2 30.52% 48.76% 56.19% 53.30% 40.17%
cbor:
cbor4ii 1.0.0
20.94% 16.28% 1.76% 49.99% 71.59% 70.26% 49.62%
cbor:
ciborium 0.2.2
3.45% 7.13% 49.99% 71.59% 70.26% 49.73%
cbor:
serde_cbor 0.11.2
6.61% 16.30% 1.91% 49.99% 71.59% 70.26% 52.99%
columnar 0.11.0 55.78% 36.26% 100.00%* 67.28% 78.02% 77.34% 59.13%
databuf 0.5.0 50.40% 39.84% 8.88% 91.89% 92.66% 86.13% 72.29%
dlhn 0.1.7 18.99% 31.42% 97.07% 95.81% 89.83% 78.38%
flatbuffers 25.12.19 13.42% 55.13% 61.64% 58.53% 52.11%
flexbuffers 25.2.10 1.90% 11.01% 1.05% 38.46% 40.43% 32.87% 29.21%
json:
serde_json 1.0.140
3.88% 13.32% 38.51% 61.38% 63.02% 45.65%
json:
simd-json 0.15.1
6.26% 17.53% 38.51% 61.38% 63.02% 46.09%
messagepack:
msgpacker 0.4.8
9.99% 31.70% 91.99% 91.61% 86.04% 71.16%
messagepack:
rmp-serde 1.3.0
9.10% 26.02% 4.15% 89.64% 88.76% 81.89% 66.83%
minicbor 1.0.0 29.29% 26.30% 4.17% 86.05% 86.82% 80.03% 63.09%
nachricht-serde 0.4.0 2.59% 17.84% 1.91% 85.96% 86.85% 79.82% 63.52%
nanoserde 0.2.1 53.59% 37.38% 67.29% 77.41% 72.96% 60.15%
nibblecode 0.1.0 74.23% 69.57% 60.93% 56.17% 47.72%
postcard 1.1.1 32.25% 36.20% 9.60% 97.07% 95.51% 89.86% 78.92%
pot 3.0.1 6.08% 12.17% 1.21% 72.40% 77.53% 74.87% 57.07%
protobuf:
prost 0.14.1
14.83%* 5.68%* 23.40% 79.55% 79.54% 72.18% 57.25%
protobuf:
protobuf 3.7.2
11.49%* 4.61%* 21.04% 79.55% 79.54% 72.18% 52.47%
rkyv 0.8.10 55.68% 52.56%* 42.45%* 69.57% 73.39% 69.74% 54.67%
ron 0.10.1 1.18% 3.44% 0.28% 43.78% 64.30% 65.07% 45.25%
savefile 0.18.6 71.73% 37.69% 67.29% 77.40% 72.96% 59.60%
scale:
parity-scale-codec 3.7.5
20.67% 32.73% 91.89% 92.65% 86.16% 71.69%
serde-brief 0.1.1 8.35% 16.55% 1.99% 44.40% 69.81% 66.87% 51.78%
serde_bare 0.5.0 19.97% 37.19% 91.89% 92.66% 86.13% 71.68%
speedy 0.8.7 69.16% 45.71% 15.29% 79.45% 79.74% 79.41% 65.35%
wincode 0.2.4 79.45% 40.42% 12.75% 67.29% 77.41% 72.96% 59.34%
wiring 0.2.4 71.44% 39.93% 67.29% 85.47% 82.42% 68.53%

Zero-copy deserialization speed

Crate Access Read Update
capnp 0.23.2 1.52%* 5.40%*
columnar 0.11.0 6.06%
flatbuffers 25.12.19 49.97%* 0.00%* 20.13%* 0.49%*
nibblecode 0.1.0 99.97%* 0.00%* 99.46%* 3.72%* 100.00%*
rkyv 0.8.10 100.00%* 0.00%* 100.00%* 2.72%* 98.23%*

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.1013.0 7.4934 ms* 8.8466 ms* 7.8549 ms 8625005 6443961 6231572 73.250 ms
bin-proto 0.12.3 8.4808 ms 9.8667 ms 6000008 5378500 5346908 8.4579 ms
bincode 2.0.1 2.8844 ms 983.75 µs 6000005 5378497 5346882 8.4744 ms
bincode 1.3.3 5.1502 ms 5.8509 ms 6000008 5378500 5346908 8.5170 ms
bitcode 0.6.6 1.3164 ms 799.57 µs 6000006 5182295 4921841 13.361 ms
borsh 1.5.7 6.2029 ms 4.1343 ms 6000004 5378496 5346866 8.4127 ms
capnp 0.23.2 6.4883 ms 14000088 7130367 6046182 81.798 ms
cbor:
cbor4ii 1.0.0
10.102 ms 47.030 ms 13125016 7524114 6757437 91.284 ms
cbor:
ciborium 0.2.2
66.362 ms 113.48 ms 13122324 7524660 6759128 90.203 ms
cbor:
serde_cbor 0.11.2
34.186 ms 41.764 ms 13122324 7524660 6759128 89.621 ms
columnar 0.11.0 1.7574 ms 1.4266 ms 670.27 µs* 6000120 5378435 5347039 8.6414 ms
databuf 0.5.0 2.4128 ms 5.3417 ms 6000003 5378495 5346897 8.7137 ms
dlhn 0.1.7 6.0779 ms 6.8965 ms 6000003 5378495 5346897 8.6596 ms
flatbuffers 25.12.19 966.06 µs 6000024 5378434 5346878 8.9064 ms
flexbuffers 25.2.10 101.48 ms 77.166 ms 26609424 11901040 12486322 153.78 ms
json:
serde_json 1.0.140
86.698 ms 98.961 ms 26192883 9566084 8584671 157.12 ms
json:
simd-json 0.15.1
53.316 ms 70.053 ms 26192883 9566084 8584671 155.24 ms
messagepack:
msgpacker 0.4.8
19.253 ms 5.0790 ms 7500005 6058442 6014500 10.497 ms
messagepack:
rmp-serde 1.3.0
15.785 ms 17.550 ms 8125006 6494876 6391037 73.573 ms
minicbor 1.0.0 5.1852 ms 11.456 ms 8125006 6494907 6390894 69.334 ms
nachricht-serde 0.4.0 120.24 ms 30.579 ms 8125037 6493484 6386940 69.183 ms
nanoserde 0.2.1 1.2317 ms 892.71 µs 6000008 5378500 5346908 8.4529 ms
nibblecode 0.1.0 148.21 µs 6000008 5378500 5346908 8.5513 ms
postcard 1.1.1 477.61 µs 1.2844 ms 6000003 5378495 5346897 8.6367 ms
pot 3.0.1 38.260 ms 77.356 ms 10122342 6814618 6852252 81.321 ms
protobuf:
prost 0.14.1
7.7566 ms* 8.3991 ms* 10.930 ms 8750000 6665735 6421877 72.361 ms
protobuf:
protobuf 3.7.2
16.002 ms* 32.013 ms* 29.259 ms 8750000 6665735 6421877 80.622 ms
rkyv 0.8.10 155.15 µs 152.49 µs* 152.60 µs* 6000008 5378500 5346872 8.5664 ms
ron 0.10.1 164.90 ms 490.10 ms 22192885 8970395 8137334 151.99 ms
savefile 0.18.6 203.96 µs 202.27 µs 6000024 5378519 5346896 8.7030 ms
scale:
parity-scale-codec 3.7.5
5.1089 ms 4.3114 ms 6000004 5378496 5346866 8.5227 ms
serde-brief 0.1.1 22.173 ms 40.323 ms 15750015 8024540 6813667 92.518 ms
serde_bare 0.5.0 5.9982 ms 4.6774 ms 6000003 5378495 5346897 8.4601 ms
speedy 0.8.7 148.09 µs 148.38 µs 6000004 5378496 5346866 8.5195 ms
wincode 0.2.4 150.53 µs 148.67 µs 6000008 5378500 5346908 8.7247 ms
wiring 0.2.4 150.24 µs 322.19 µs 6000008 5378952 5346905 8.7099 ms

Zero-copy deserialization speed

Crate Access Read Update
capnp 0.23.2 117.20 ns* 1.9246 ms*
columnar 0.11.0 19.273 ns
flatbuffers 25.12.19 2.4866 ns* 45.498 ns* 77.764 µs* 77.747 µs*
nibblecode 0.1.0 1.2493 ns* 1.5542 ns* 38.839 µs* 38.855 µs* 78.482 µs*
rkyv 0.8.10 1.2425 ns* 5.2922 ns* 38.859 µs* 38.830 µs* 76.247 µs*

Comparison

Relative to best. Higher is better.

Serialize / deserialize speed and size

Crate Serialize Deserialize Size Zlib Zstd Zstd Time
bilrost 0.1013.0 1.98%* 1.67%* 1.89% 69.57% 80.42% 78.98% 11.48%
bin-proto 0.12.3 1.75% 1.50% 100.00% 96.35% 92.05% 99.47%
bincode 2.0.1 5.13% 15.08% 100.00% 96.35% 92.05% 99.27%
bincode 1.3.3 2.88% 2.54% 100.00% 96.35% 92.05% 98.78%
bitcode 0.6.6 11.25% 18.56% 100.00% 100.00% 100.00% 62.97%
borsh 1.5.7 2.39% 3.59% 100.00% 96.35% 92.05% 100.00%
capnp 0.23.2 2.28% 42.86% 72.68% 81.40% 10.28%
cbor:
cbor4ii 1.0.0
1.47% 0.32% 45.71% 68.88% 72.84% 9.22%
cbor:
ciborium 0.2.2
0.22% 0.13% 45.72% 68.87% 72.82% 9.33%
cbor:
serde_cbor 0.11.2
0.43% 0.36% 45.72% 68.87% 72.82% 9.39%
columnar 0.11.0 8.43% 10.40% 22.14%* 100.00% 96.35% 92.05% 97.35%
databuf 0.5.0 6.14% 2.78% 100.00% 96.35% 92.05% 96.55%
dlhn 0.1.7 2.44% 2.15% 100.00% 96.35% 92.05% 97.15%
flatbuffers 25.12.19 15.33% 100.00% 96.35% 92.05% 94.46%
flexbuffers 25.2.10 0.15% 0.19% 22.55% 43.54% 39.42% 5.47%
json:
serde_json 1.0.140
0.17% 0.15% 22.91% 54.17% 57.33% 5.35%
json:
simd-json 0.15.1
0.28% 0.21% 22.91% 54.17% 57.33% 5.42%
messagepack:
msgpacker 0.4.8
0.77% 2.92% 80.00% 85.54% 81.83% 80.14%
messagepack:
rmp-serde 1.3.0
0.94% 0.85% 73.85% 79.79% 77.01% 11.43%
minicbor 1.0.0 2.86% 1.30% 73.85% 79.79% 77.01% 12.13%
nachricht-serde 0.4.0 0.12% 0.49% 73.85% 79.81% 77.06% 12.16%
nanoserde 0.2.1 12.02% 16.62% 100.00% 96.35% 92.05% 99.52%
nibblecode 0.1.0 99.92% 100.00% 96.35% 92.05% 98.38%
postcard 1.1.1 31.01% 11.55% 100.00% 96.35% 92.05% 97.41%
pot 3.0.1 0.39% 0.19% 59.27% 76.05% 71.83% 10.35%
protobuf:
prost 0.14.1
1.91%* 1.76%* 1.36% 68.57% 77.75% 76.64% 11.63%
protobuf:
protobuf 3.7.2
0.93%* 0.46%* 0.51% 68.57% 77.75% 76.64% 10.43%
rkyv 0.8.10 95.45% 97.30%* 97.23%* 100.00% 96.35% 92.05% 98.21%
ron 0.10.1 0.09% 0.03% 27.04% 57.77% 60.48% 5.54%
savefile 0.18.6 72.61% 73.36% 100.00% 96.35% 92.05% 96.66%
scale:
parity-scale-codec 3.7.5
2.90% 3.44% 100.00% 96.35% 92.05% 98.71%
serde-brief 0.1.1 0.67% 0.37% 38.10% 64.58% 72.23% 9.09%
serde_bare 0.5.0 2.47% 3.17% 100.00% 96.35% 92.05% 99.44%
speedy 0.8.7 100.00% 100.00% 100.00% 96.35% 92.05% 98.75%
wincode 0.2.4 98.38% 99.80% 100.00% 96.35% 92.05% 96.42%
wiring 0.2.4 98.57% 46.05% 100.00% 96.34% 92.05% 96.59%

Zero-copy deserialization speed

Crate Access Read Update
capnp 0.23.2 1.06%* 2.02%*
columnar 0.11.0 6.45%
flatbuffers 25.12.19 49.97%* 2.73%* 49.93%* 49.94%*
nibblecode 0.1.0 99.46%* 79.94%* 99.98%* 99.94%* 97.15%*
rkyv 0.8.10 100.00%* 23.48%* 99.93%* 100.00%* 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.1013.0 890.83 µs* 774.56 µs* 3.1644 ms 1.7138 ms 489348 281173 249360 2.6405 ms
bin-proto 0.12.3 1.8463 ms 2.7975 ms 566975 239350 231475 2.4343 ms
bincode 2.0.1 322.88 µs 1.9345 ms 851.81 µs 367413 221291 206242 2.0369 ms
bincode 1.3.3 593.81 µs 1.8420 ms 853.62 µs 569975 240525 231884 2.4510 ms
bitcode 0.6.6 126.72 µs 1.2575 ms 173.09 µs 327688 200947 182040 745.01 µs
borsh 1.5.7 560.60 µs 1.8206 ms 446595 234236 209834 2.0635 ms
capnp 0.23.2 440.28 µs 803896 335606 280744 3.5865 ms
cbor:
cbor4ii 1.0.0
741.93 µs 4.5566 ms 3.3414 ms 1109831 344745 274333 3.4733 ms
cbor:
ciborium 0.2.2
3.6148 ms 10.140 ms 1109821 344751 274345 3.4461 ms
cbor:
serde_cbor 0.11.2
1.8650 ms 4.6148 ms 3.2907 ms 1109821 344751 274345 3.4629 ms
columnar 0.11.0 297.97 µs 1.9172 ms 763.45 µs* 563728 249696 217582 1.6110 ms
databuf 0.5.0 296.07 µs 1.7589 ms 777.03 µs 356311 213062 198403 1.9519 ms
dlhn 0.1.7 776.68 µs 2.5708 ms 366496 220600 205586 2.0213 ms
flatbuffers 25.12.19 3.2471 ms 849472 347816 294871 3.5646 ms
flexbuffers 25.2.10 7.8009 ms 6.7487 ms 5.3993 ms 1187688 557642 553730 6.2557 ms
json:
serde_json 1.0.140
3.6423 ms 6.8517 ms 1623191 466527 359157 5.6770 ms
json:
simd-json 0.15.1
2.2245 ms 4.7172 ms 1623191 466527 359157 5.6741 ms
messagepack:
msgpacker 0.4.8
989.74 µs 2.8463 ms 391251 236877 220395 2.1691 ms
messagepack:
rmp-serde 1.3.0
1.5458 ms 3.0547 ms 1.7236 ms 424533 245214 226077 2.2906 ms
minicbor 1.0.0 563.90 µs 3.3666 ms 1.8654 ms 428773 249857 228630 2.2835 ms
nachricht-serde 0.4.0 5.0823 ms 4.2781 ms 3.0659 ms 449745 252432 230965 2.2948 ms
nanoserde 0.2.1 262.01 µs 1.8742 ms 567975 239930 231872 2.4485 ms
nibblecode 0.1.0 198.67 µs 603928 432462 409595 3.5789 ms
postcard 1.1.1 444.72 µs 1.9938 ms 801.80 µs 367489 221913 207244 2.0241 ms
pot 3.0.1 2.3666 ms 6.2793 ms 5.0611 ms 599125 299158 247675 2.7034 ms
protobuf:
prost 0.14.1
1.2922 ms* 2.9930 ms* 3.4581 ms 596811 305319 268737 2.9664 ms
protobuf:
protobuf 3.7.2
1.0732 ms* 3.0099 ms* 3.8994 ms 596811 305319 268737 3.0346 ms
rkyv 0.8.10 326.82 µs 1.4921 ms* 1.8425 ms* 603776 254776 219421 2.3140 ms
ron 0.10.1 7.9592 ms 24.523 ms 22.723 ms 1465223 434935 342907 5.5974 ms
savefile 0.18.6 213.62 µs 1.8317 ms 566991 239362 231478 2.4379 ms
scale:
parity-scale-codec 3.7.5
631.04 µs 2.0859 ms 356311 212976 198423 1.9902 ms
serde-brief 0.1.1 1.3155 ms 5.3892 ms 3.6976 ms 1276014 373898 293384 3.7419 ms
serde_bare 0.5.0 764.50 µs 2.3369 ms 356311 213062 198403 2.0353 ms
speedy 0.8.7 266.79 µs 1.6772 ms 541.12 µs 449595 234970 210192 2.1424 ms
wincode 0.2.4 201.43 µs 1.6799 ms 625.47 µs 566975 239350 231475 2.4601 ms
wiring 0.2.4 209.55 µs 1.8457 ms 566975 247810 225086 2.7337 ms

Zero-copy deserialization speed

Crate Access Read Update
capnp 0.23.2 85.187 ns* 370.46 ns*
columnar 0.11.0 828.22 ns
flatbuffers 25.12.19 2.4856 ns* 2.3988 ms* 1.4209 µs* 2.4030 ms*
nibblecode 0.1.0 1.2427 ns* 256.65 µs* 155.97 ns* 258.76 µs* 751.96 ns*
rkyv 0.8.10 1.2431 ns* 323.51 µs* 156.06 ns* 321.69 µs* 774.31 ns*

Comparison

Relative to best. Higher is better.

Serialize / deserialize speed and size

Crate Serialize Deserialize Borrow Size Zlib Zstd Zstd Time
bilrost 0.1013.0 14.22%* 16.36%* 24.13% 10.10% 66.96% 71.47% 73.00% 28.21%
bin-proto 0.12.3 6.86% 27.29% 57.80% 83.96% 78.64% 30.60%
bincode 2.0.1 39.25% 39.46% 20.32% 89.19% 90.81% 88.27% 36.58%
bincode 1.3.3 21.34% 41.45% 20.28% 57.49% 83.55% 78.50% 30.40%
bitcode 0.6.6 100.00% 60.71% 100.00% 100.00% 100.00% 100.00% 100.00%
borsh 1.5.7 22.60% 41.93% 73.37% 85.79% 86.75% 36.10%
capnp 0.23.2 28.78% 40.76% 59.88% 64.84% 20.77%
cbor:
cbor4ii 1.0.0
17.08% 16.75% 5.18% 29.53% 58.29% 66.36% 21.45%
cbor:
ciborium 0.2.2
3.51% 7.53% 29.53% 58.29% 66.35% 21.62%
cbor:
serde_cbor 0.11.2
6.79% 16.54% 5.26% 29.53% 58.29% 66.35% 21.51%
columnar 0.11.0 42.53% 39.82% 100.00%* 58.13% 80.48% 83.67% 46.25%
databuf 0.5.0 42.80% 43.40% 22.28% 91.97% 94.31% 91.75% 38.17%
dlhn 0.1.7 16.32% 29.70% 89.41% 91.09% 88.55% 36.86%
flatbuffers 25.12.19 3.90% 38.58% 57.77% 61.74% 20.90%
flexbuffers 25.2.10 1.62% 11.31% 3.21% 27.59% 36.04% 32.88% 11.91%
json:
serde_json 1.0.140
3.48% 11.14% 20.19% 43.07% 50.69% 13.12%
json:
simd-json 0.15.1
5.70% 16.18% 20.19% 43.07% 50.69% 13.13%
messagepack:
msgpacker 0.4.8
12.80% 26.82% 83.75% 84.83% 82.60% 34.35%
messagepack:
rmp-serde 1.3.0
8.20% 24.99% 10.04% 77.19% 81.95% 80.52% 32.52%
minicbor 1.0.0 22.47% 22.68% 9.28% 76.42% 80.42% 79.62% 32.63%
nachricht-serde 0.4.0 2.49% 17.85% 5.65% 72.86% 79.60% 78.82% 32.47%
nanoserde 0.2.1 48.36% 40.73% 57.69% 83.75% 78.51% 30.43%
nibblecode 0.1.0 63.78% 54.26% 46.47% 44.44% 20.82%
postcard 1.1.1 28.49% 38.29% 21.59% 89.17% 90.55% 87.84% 36.81%
pot 3.0.1 5.35% 12.16% 3.42% 54.69% 67.17% 73.50% 27.56%
protobuf:
prost 0.14.1
9.81%* 4.23%* 22.08% 54.91% 65.82% 67.74% 25.11%
protobuf:
protobuf 3.7.2
11.81%* 4.21%* 19.58% 54.91% 65.82% 67.74% 24.55%
rkyv 0.8.10 38.77% 51.17%* 41.44%* 54.27% 78.87% 82.96% 32.20%
ron 0.10.1 1.59% 3.11% 0.76% 22.36% 46.20% 53.09% 13.31%
savefile 0.18.6 59.32% 41.68% 57.79% 83.95% 78.64% 30.56%
scale:
parity-scale-codec 3.7.5
20.08% 36.60% 91.97% 94.35% 91.74% 37.43%
serde-brief 0.1.1 9.63% 14.17% 4.68% 25.68% 53.74% 62.05% 19.91%
serde_bare 0.5.0 16.58% 32.67% 91.97% 94.31% 91.75% 36.60%
speedy 0.8.7 47.50% 45.52% 31.99% 72.89% 85.52% 86.61% 34.77%
wincode 0.2.4 62.91% 45.45% 27.67% 57.80% 83.96% 78.64% 30.28%
wiring 0.2.4 60.47% 41.36% 57.80% 81.09% 80.88% 27.25%

Zero-copy deserialization speed

Crate Access Read Update
capnp 0.23.2 1.46%* 42.10%*
columnar 0.11.0 0.15%
flatbuffers 25.12.19 50.00%* 0.00%* 10.98%* 0.01%*
nibblecode 0.1.0 100.00%* 0.00%* 100.00%* 0.06%* 100.00%*
rkyv 0.8.10 99.97%* 0.00%* 99.94%* 0.05%* 97.11%*

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.1013.0 4.4998 ms* 2.6366 ms* 8.4280 ms 1704643 1294259 1245668 11.738 ms
bin-proto 0.12.3 5.5657 ms 6.8226 ms 1791489 1127998 1051146 10.351 ms
bincode 2.0.1 1.4125 ms 3.9669 ms 1406257 1117802 1062438 9.6970 ms
bincode 1.3.3 3.9421 ms 4.1412 ms 1854234 1141994 1048745 10.561 ms
bitcode 0.6.6 735.68 µs 2.3452 ms 971318 878034 850340 2.9480 ms
borsh 1.5.7 2.9380 ms 2.8547 ms 1521989 1108471 1038528 10.050 ms
capnp 0.23.2 2.1641 ms 2724288 1546992 1239111 15.328 ms
cbor:
cbor4ii 1.0.0
3.0371 ms 18.049 ms 6012539 1695215 1464951 21.945 ms
cbor:
ciborium 0.2.2
24.228 ms 55.229 ms 6012373 1695146 1465025 21.789 ms
cbor:
serde_cbor 0.11.2
10.004 ms 21.202 ms 6012373 1695146 1465025 21.714 ms
columnar 0.11.0 903.62 µs 3.6607 ms 1.2286 ms* 1544752 996728 897073 4.8218 ms
databuf 0.5.0 1.3064 ms 3.7893 ms 1319999 1062631 1008334 9.1485 ms
dlhn 0.1.7 4.9232 ms 6.6493 ms 1311281 1077520 1046095 8.6285 ms
flatbuffers 25.12.19 5.3014 ms 2325620 1439185 1268060 13.802 ms
flexbuffers 25.2.10 39.864 ms 35.262 ms 5352680 2658295 2777967 36.096 ms
json:
serde_json 1.0.140
20.990 ms 31.735 ms 9390461 2391679 1842767 35.696 ms
json:
simd-json 0.15.1
12.100 ms 26.755 ms 9390461 2391679 1842767 35.296 ms
messagepack:
msgpacker 0.4.8
2.2214 ms 6.1165 ms 1458773 1156055 1137788 9.7393 ms
messagepack:
rmp-serde 1.3.0
10.339 ms 10.783 ms 1745322 1261627 1228923 11.930 ms
minicbor 1.0.0 2.4996 ms 11.452 ms 1777386 1276218 1252558 12.972 ms
nachricht-serde 0.4.0 30.835 ms 20.642 ms 1770060 1277755 1263362 12.443 ms
nanoserde 0.2.1 1.2876 ms 2.7974 ms 1812404 1134820 1053109 10.566 ms
nibblecode 0.1.0 504.64 µs 2075936 1368001 1224891 13.609 ms
postcard 1.1.1 1.8575 ms 4.2005 ms 1311281 1083900 1041434 8.8015 ms
pot 3.0.1 13.956 ms 30.299 ms 2604812 1482233 1298928 16.129 ms
protobuf:
prost 0.14.1
5.4714 ms* 9.3817 ms* 8.7063 ms 1859886 1338076 1295351 12.481 ms
protobuf:
protobuf 3.7.2
5.7536 ms* 13.081 ms* 11.963 ms 1859886 1338076 1295351 12.398 ms
rkyv 0.8.10 998.26 µs 2.1668 ms* 2.6365 ms* 2075936 1383779 1210377 13.046 ms
ron 0.10.1 41.843 ms 151.46 ms 8677703 2233642 1826180 34.864 ms
savefile 0.18.6 870.09 µs 2.7635 ms 1791505 1128012 1051153 10.534 ms
scale:
parity-scale-codec 3.7.5
3.1786 ms 3.3341 ms 1319999 1064380 1010708 8.8414 ms
serde-brief 0.1.1 6.6687 ms 21.684 ms 6951772 1796265 1567819 24.760 ms
serde_bare 0.5.0 4.8304 ms 4.8528 ms 1319999 1062645 1008349 9.0938 ms
speedy 0.8.7 773.86 µs 2.4983 ms 1584734 1119837 1037992 10.147 ms
wincode 0.2.4 566.05 µs 2.3606 ms 1791489 1127998 1051146 10.361 ms
wiring 0.2.4 641.68 µs 2.8557 ms 1791489 1156963 1082815 10.941 ms

Zero-copy deserialization speed

Crate Access Read Update
capnp 0.23.2 85.396 ns* 497.47 ns*
columnar 0.11.0 52.846 ns
flatbuffers 25.12.19 2.4863 ns* 5.5726 ms* 2.7359 µs* 5.5654 ms*
nibblecode 0.1.0 1.2427 ns* 341.53 µs* 375.79 ns* 341.61 µs* 237.23 ns*
rkyv 0.8.10 1.2429 ns* 447.77 µs* 384.67 ns* 447.92 µs* 234.78 ns*

Comparison

Relative to best. Higher is better.

Serialize / deserialize speed and size

Crate Serialize Deserialize Size Zlib Zstd Zstd Time
bilrost 0.1013.0 11.21%* 19.14%* 14.58% 56.98% 67.84% 68.26% 25.12%
bin-proto 0.12.3 9.07% 18.01% 54.22% 77.84% 80.90% 28.48%
bincode 2.0.1 35.73% 30.97% 69.07% 78.55% 80.04% 30.40%
bincode 1.3.3 12.80% 29.67% 52.38% 76.89% 81.08% 27.91%
bitcode 0.6.6 68.60% 52.39% 100.00% 100.00% 100.00% 100.00%
borsh 1.5.7 17.18% 43.04% 63.82% 79.21% 81.88% 29.33%
capnp 0.23.2 23.32% 35.65% 56.76% 68.63% 19.23%
cbor:
cbor4ii 1.0.0
16.62% 6.81% 16.15% 51.79% 58.05% 13.43%
cbor:
ciborium 0.2.2
2.08% 2.22% 16.16% 51.80% 58.04% 13.53%
cbor:
serde_cbor 0.11.2
5.04% 5.79% 16.16% 51.80% 58.04% 13.58%
columnar 0.11.0 55.85% 33.56% 100.00%* 62.88% 88.09% 94.79% 61.14%
databuf 0.5.0 38.63% 32.42% 73.58% 82.63% 84.33% 32.22%
dlhn 0.1.7 10.25% 18.48% 74.07% 81.49% 81.29% 34.17%
flatbuffers 25.12.19 9.52% 41.77% 61.01% 67.06% 21.36%
flexbuffers 25.2.10 1.27% 3.48% 18.15% 33.03% 30.61% 8.17%
json:
serde_json 1.0.140
2.40% 3.87% 10.34% 36.71% 46.14% 8.26%
json:
simd-json 0.15.1
4.17% 4.59% 10.34% 36.71% 46.14% 8.35%
messagepack:
msgpacker 0.4.8
22.72% 20.09% 66.58% 75.95% 74.74% 30.27%
messagepack:
rmp-serde 1.3.0
4.88% 11.39% 55.65% 69.60% 69.19% 24.71%
minicbor 1.0.0 20.19% 10.73% 54.65% 68.80% 67.89% 22.73%
nachricht-serde 0.4.0 1.64% 5.95% 54.87% 68.72% 67.31% 23.69%
nanoserde 0.2.1 39.19% 43.92% 53.59% 77.37% 80.75% 27.90%
nibblecode 0.1.0 100.00% 46.79% 64.18% 69.42% 21.66%
postcard 1.1.1 27.17% 29.25% 74.07% 81.01% 81.65% 33.49%
pot 3.0.1 3.62% 4.05% 37.29% 59.24% 65.46% 18.28%
protobuf:
prost 0.14.1
9.22%* 5.38%* 14.11% 52.22% 65.62% 65.65% 23.62%
protobuf:
protobuf 3.7.2
8.77%* 3.86%* 10.27% 52.22% 65.62% 65.65% 23.78%
rkyv 0.8.10 50.55% 56.70%* 46.60%* 46.79% 63.45% 70.25% 22.60%
ron 0.10.1 1.21% 0.81% 11.19% 39.31% 46.56% 8.46%
savefile 0.18.6 58.00% 44.46% 54.22% 77.84% 80.90% 27.99%
scale:
parity-scale-codec 3.7.5
15.88% 36.85% 73.58% 82.49% 84.13% 33.34%
serde-brief 0.1.1 7.57% 5.67% 13.97% 48.88% 54.24% 11.91%
serde_bare 0.5.0 10.45% 25.32% 73.58% 82.63% 84.33% 32.42%
speedy 0.8.7 65.21% 49.18% 61.29% 78.41% 81.92% 29.05%
wincode 0.2.4 89.15% 52.05% 54.22% 77.84% 80.90% 28.45%
wiring 0.2.4 78.64% 43.02% 54.22% 75.89% 78.53% 26.95%

Zero-copy deserialization speed

Crate Access Read Update
capnp 0.23.2 1.46%* 75.54%*
columnar 0.11.0 2.35%
flatbuffers 25.12.19 49.98%* 0.00%* 13.74%* 0.01%*
nibblecode 0.1.0 100.00%* 0.00%* 100.00%* 0.11%* 98.97%*
rkyv 0.8.10 99.98%* 0.00%* 97.69%* 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)

About

Benchmarks for rust serialization frameworks

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 33

Languages