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-06-30 23:56:04

Runtime info

rustc version

rustc 1.98.0-nightly (096694416 2026-06-29)
binary: rustc
commit-hash: 096694416a41840709140eb0fd0ca193d1a3e6ba
commit-date: 2026-06-29
host: x86_64-unknown-linux-gnu
release: 1.98.0-nightly
LLVM version: 22.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 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 425.60 µs* 421.53 µs* 2.6305 ms 824.42 µs 804955 328941 284849 4.2433 ms
bin-proto 0.12.8 4.3354 ms 4.6134 ms 1045784 373127 311553 4.5531 ms
bincode 2.0.1 366.99 µs 2.1880 ms 705.62 µs 741295 303944 256422 3.6572 ms
bincode 1.3.3 525.37 µs 2.0340 ms 597.51 µs 1045784 373127 311553 4.4869 ms
bitcode 0.6.9 139.38 µs 1.4552 ms 60.352 µs 703710 288826 227322 2.5910 ms
borsh 1.7.0 545.96 µs 2.3590 ms 885780 362204 286248 3.9283 ms
capnp:
capnp 0.26.0
600.02 µs 1.5038 ms* 1443216 1046865* 513986 481681* 426532 458024* 6.2675 ms 5.3795 ms*
cbor:
cbor4ii 1.2.2
615.54 µs 5.0146 ms 3.4506 ms 1407835 403440 323561 5.0626 ms
cbor:
ciborium 0.2.2
3.9778 ms 11.064 ms 1407835 403440 323561 5.0151 ms
cbor:
serde_cbor 0.11.2
2.0027 ms 4.5084 ms 2.9334 ms 1407835 403440 323561 4.7413 ms
columnar 0.13.1 248.25 µs 2.0964 ms 727.09 µs* 1045928 370212 293907 4.2901 ms
compactly 0.1.7 24.490 ms 16.153 ms 239520 239720 239532 162.85 µs
databuf 0.5.0 260.49 µs 2.0275 ms 675.37 µs 765778 311715 263914 3.5535 ms
dlhn 0.1.7 678.54 µs 2.6030 ms 724953 301446 253056 3.2934 ms
flatbuffers 25.12.19 1.0422 ms 1276368 468539 388381 4.8370 ms
flexbuffers 25.12.19 6.6317 ms 7.6457 ms 5.3553 ms 1829756 714318 691541 8.5944 ms
json:
flexon 0.4.6
2.7808 ms 3.8150 ms 1827461 470560 360727 5.4848 ms
json:
serde_json 1.0.150
3.7975 ms 6.0755 ms 1827461 470560 360727 5.5540 ms
json:
simd-json 0.17.0
2.1312 ms 4.7409 ms 1827461 470560 360727 5.5572 ms
messagepack:
msgpacker 0.7.1
365.53 µs 2.6190 ms 916.35 µs 764996 315291 264212 3.5882 ms
messagepack:
rmp-serde 1.3.1
1.5393 ms 3.1531 ms 1.4917 ms 784997 325384 277608 3.7567 ms
messagepack:
zerompk 0.6.0
355.78 µs 2.2727 ms 814.46 µs 784997 325384 277608 3.7978 ms
minicbor 2.2.2 503.45 µs 2.8860 ms 1.4040 ms 817830 332671 284034 3.9920 ms
nachricht-serde 0.4.0 5.3837 ms 4.0053 ms 2.5509 ms 818669 332556 284797 4.0250 ms
nanoserde 0.2.1 254.63 µs 2.0917 ms 1045784 373127 311553 4.3041 ms
nibblecode 0.1.0 193.23 µs 1011487 473999 404669 5.3737 ms
postcard 1.1.3 423.36 µs 2.3217 ms 632.52 µs 724953 302399 252968 3.3434 ms
pot 3.0.1 2.3453 ms 6.0920 ms 4.6101 ms 971922 372513 303636 4.4027 ms
protobuf:
buffa 0.8.0
766.68 µs* 2.5340 ms* 3.3227 ms 2.1691 ms 884628 363130 314959 4.4146 ms
protobuf:
prost 0.14.4
949.73 µs* 2.4769 ms* 3.4334 ms 884628 363130 314959 4.5032 ms
protobuf:
protobuf 3.7.2
1.2359 ms* 3.0721 ms* 3.8614 ms 884628 363130 314959 4.4463 ms
rkyv 0.8.16 244.41 µs 1.5443 ms* 1.9151 ms* 1011488 393526 325965 4.6545 ms
ron 0.12.2 12.233 ms 26.373 ms 23.926 ms 1607459 449158 349324 5.5966 ms
savefile 0.20.4 197.06 µs 2.2850 ms 1045800 373139 311562 4.3178 ms
scale:
parity-scale-codec 3.7.5
658.52 µs 2.3291 ms 765778 311743 263822 3.5008 ms
serde-brief 0.2.0 1.3844 ms 4.6120 ms 2.8286 ms 1584946 413733 339964 4.9151 ms
serde_bare 0.5.0 704.40 µs 2.0792 ms 765778 311715 263914 3.5429 ms
speedy 0.8.7 195.99 µs 1.7595 ms 372.05 µs 885780 362204 286248 3.8763 ms
wincode 0.5.5 172.17 µs 1.7615 ms 365.56 µs 1045784 373127 311553 4.2164 ms
wiring 0.2.4 193.18 µs 2.0679 ms 1045784 337930 275808 3.7103 ms

Zero-copy deserialization speed

Crate Access Read Update
capnp:
capnp 0.26.0
76.039 ns* 1.0340 ms* 144.65 µs*
columnar 0.13.1 20.300 ns
flatbuffers 25.12.19 2.4901 ns* 2.1006 ms* 48.653 µs* 2.1453 ms*
nibblecode 0.1.0 1.2445 ns* 236.81 µs* 10.423 µs* 246.12 µs* 7.3880 µs*
rkyv 0.8.16 1.2446 ns* 365.92 µs* 10.381 µs* 371.92 µs* 7.6182 µ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 32.75%* 33.07%* 27.64% 7.32% 29.76% 72.88% 79.80% 3.84%
bin-proto 0.12.8 3.21% 15.76% 22.90% 64.25% 72.96% 3.58%
bincode 2.0.1 37.98% 33.23% 8.55% 32.31% 78.87% 88.65% 4.45%
bincode 1.3.3 26.53% 35.75% 10.10% 22.90% 64.25% 72.96% 3.63%
bitcode 0.6.9 100.00% 49.96% 100.00% 34.04% 83.00% 100.00% 6.29%
borsh 1.7.0 25.53% 30.82% 27.04% 66.18% 79.41% 4.15%
capnp:
capnp 0.26.0
23.23% 9.27%* 16.60% 22.88%* 46.64% 49.77%* 53.30% 49.63%* 2.60% 3.03%*
cbor:
cbor4ii 1.2.2
22.64% 14.50% 1.75% 17.01% 59.42% 70.26% 3.22%
cbor:
ciborium 0.2.2
3.50% 6.57% 17.01% 59.42% 70.26% 3.25%
cbor:
serde_cbor 0.11.2
6.96% 16.13% 2.06% 17.01% 59.42% 70.26% 3.43%
columnar 0.13.1 56.15% 34.68% 100.00%* 22.90% 64.75% 77.34% 3.80%
compactly 0.1.7 0.57% 4.50% 100.00% 100.00% 94.90% 100.00%
databuf 0.5.0 53.51% 35.86% 8.94% 31.28% 76.90% 86.13% 4.58%
dlhn 0.1.7 20.54% 27.93% 33.04% 79.52% 89.83% 4.94%
flatbuffers 25.12.19 13.37% 18.77% 51.16% 58.53% 3.37%
flexbuffers 25.12.19 2.10% 9.51% 1.13% 13.09% 33.56% 32.87% 1.89%
json:
flexon 0.4.6
5.01% 19.06% 13.11% 50.94% 63.02% 2.97%
json:
serde_json 1.0.150
3.67% 11.97% 13.11% 50.94% 63.02% 2.93%
json:
simd-json 0.17.0
6.54% 15.34% 13.11% 50.94% 63.02% 2.93%
messagepack:
msgpacker 0.7.1
38.13% 27.76% 6.59% 31.31% 76.03% 86.04% 4.54%
messagepack:
rmp-serde 1.3.1
9.05% 23.06% 4.05% 30.51% 73.67% 81.89% 4.34%
messagepack:
zerompk 0.6.0
39.18% 31.99% 7.41% 30.51% 73.67% 81.89% 4.29%
minicbor 2.2.2 27.68% 25.19% 4.30% 29.29% 72.06% 80.03% 4.08%
nachricht-serde 0.4.0 2.59% 18.15% 2.37% 29.26% 72.08% 79.82% 4.05%
nanoserde 0.2.1 54.74% 34.76% 22.90% 64.25% 72.96% 3.78%
nibblecode 0.1.0 72.13% 23.68% 50.57% 56.17% 3.03%
postcard 1.1.3 32.92% 31.32% 9.54% 33.04% 79.27% 89.86% 4.87%
pot 3.0.1 5.94% 11.94% 1.31% 24.64% 64.35% 74.87% 3.70%
protobuf:
buffa 0.8.0
18.18%* 5.50%* 21.88% 2.78% 27.08% 66.01% 72.18% 3.69%
protobuf:
prost 0.14.4
14.68%* 5.63%* 21.18% 27.08% 66.01% 72.18% 3.62%
protobuf:
protobuf 3.7.2
11.28%* 4.54%* 18.83% 27.08% 66.01% 72.18% 3.66%
rkyv 0.8.16 57.03% 47.08%* 37.97%* 23.68% 60.92% 69.74% 3.50%
ron 0.12.2 1.14% 2.76% 0.25% 14.90% 53.37% 65.07% 2.91%
savefile 0.20.4 70.73% 31.82% 22.90% 64.24% 72.96% 3.77%
scale:
parity-scale-codec 3.7.5
21.17% 31.22% 31.28% 76.90% 86.16% 4.65%
serde-brief 0.2.0 10.07% 15.77% 2.13% 15.11% 57.94% 66.87% 3.31%
serde_bare 0.5.0 19.79% 34.97% 31.28% 76.90% 86.13% 4.60%
speedy 0.8.7 71.12% 41.32% 16.22% 27.04% 66.18% 79.41% 4.20%
wincode 0.5.5 80.95% 41.28% 16.51% 22.90% 64.25% 72.96% 3.86%
wiring 0.2.4 72.15% 35.16% 22.90% 70.94% 82.42% 4.39%

Zero-copy deserialization speed

Crate Access Read Update
capnp:
capnp 0.26.0
1.64%* 1.00%* 7.18%*
columnar 0.13.1 6.13%
flatbuffers 25.12.19 49.98%* 0.00%* 21.34%* 0.48%*
nibblecode 0.1.0 100.00%* 0.00%* 99.60%* 4.22%* 100.00%*
rkyv 0.8.16 99.99%* 0.00%* 100.00%* 2.79%* 96.98%*

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.2132 ms* 8.6258 ms* 7.7042 ms 8625005 6443961 6231572 72.021 ms
bin-proto 0.12.8 8.3250 ms 10.396 ms 6000008 5378500 5346908 8.8482 ms
bincode 2.0.1 2.9056 ms 788.35 µs 6000005 5378497 5346882 8.9613 ms
bincode 1.3.3 5.6362 ms 4.7897 ms 6000008 5378500 5346908 9.0316 ms
bitcode 0.6.9 1.3073 ms 805.06 µs 6000006 5182295 4921841 13.475 ms
borsh 1.7.0 6.1528 ms 4.2085 ms 6000004 5378496 5346866 8.8632 ms
capnp:
capnp 0.26.0
9.7229 ms 19.463 ms* 14000088 10401737* 7130367 7308001* 6046182 7922110* 83.914 ms 66.848 ms*
cbor:
cbor4ii 1.2.2
8.9125 ms 44.556 ms 13125016 7524114 6757437 92.826 ms
cbor:
ciborium 0.2.2
67.417 ms 111.02 ms 13122324 7524660 6759128 93.519 ms
cbor:
serde_cbor 0.11.2
35.989 ms 40.593 ms 13122324 7524660 6759128 90.851 ms
columnar 0.13.1 1.7365 ms 1.4426 ms 669.39 µs* 6000120 5378435 5347039 8.7771 ms
compactly 0.1.7 355.72 ms 161.94 ms 4846788 4850067 4846905 1.6500 ms
databuf 0.5.0 2.4129 ms 5.3953 ms 6000003 5378495 5346897 9.0490 ms
dlhn 0.1.7 6.0225 ms 7.0221 ms 6000003 5378495 5346897 8.9640 ms
flatbuffers 25.12.19 449.90 µs 6000024 5378434 5346878 8.7064 ms
flexbuffers 25.12.19 103.96 ms 76.385 ms 26609424 11901040 12486322 149.76 ms
json:
flexon 0.4.6
76.391 ms 55.565 ms 26192883 9566084 8584671 154.89 ms
json:
serde_json 1.0.150
92.640 ms 100.26 ms 26192883 9566084 8584671 155.45 ms
json:
simd-json 0.17.0
53.117 ms 66.906 ms 26192883 9566084 8584671 155.47 ms
messagepack:
msgpacker 0.7.1
670.78 µs 5.2685 ms 7500005 6058442 6014500 10.487 ms
messagepack:
rmp-serde 1.3.1
19.829 ms 16.491 ms 8125006 6494876 6391037 73.418 ms
messagepack:
zerompk 0.6.0
735.22 µs 5.2009 ms 8125006 6494876 6391037 75.933 ms
minicbor 2.2.2 5.1932 ms 11.660 ms 8125006 6494907 6390894 69.653 ms
nachricht-serde 0.4.0 121.82 ms 25.868 ms 8125037 6493484 6386940 73.136 ms
nanoserde 0.2.1 1.6160 ms 892.93 µs 6000008 5378500 5346908 8.9869 ms
nibblecode 0.1.0 148.53 µs 6000008 5378500 5346908 8.8317 ms
postcard 1.1.3 494.25 µs 951.65 µs 6000003 5378495 5346897 8.6873 ms
pot 3.0.1 38.178 ms 64.267 ms 10122342 6814618 6852252 81.452 ms
protobuf:
buffa 0.8.0
8.7110 ms* 25.222 ms* 26.097 ms 8750000 6665735 6421877 72.488 ms
protobuf:
prost 0.14.4
8.0763 ms* 8.6600 ms* 14.861 ms 8750000 6665735 6421877 76.246 ms
protobuf:
protobuf 3.7.2
16.561 ms* 32.932 ms* 30.328 ms 8750000 6665735 6421877 78.490 ms
rkyv 0.8.16 188.69 µs 151.81 µs* 151.78 µs* 6000008 5378500 5346872 8.9102 ms
ron 0.12.2 181.30 ms 576.73 ms 22192885 8970395 8137334 148.34 ms
savefile 0.20.4 148.26 µs 148.54 µs 6000024 5378519 5346896 8.7455 ms
scale:
parity-scale-codec 3.7.5
5.1669 ms 4.6893 ms 6000004 5378496 5346866 8.8210 ms
serde-brief 0.2.0 17.988 ms 35.999 ms 15750015 8024540 6813667 95.457 ms
serde_bare 0.5.0 5.9093 ms 4.8860 ms 6000003 5378495 5346897 9.0753 ms
speedy 0.8.7 148.22 µs 149.66 µs 6000004 5378496 5346866 8.8796 ms
wincode 0.5.5 149.50 µs 149.05 µs 6000008 5378500 5346908 8.8608 ms
wiring 0.2.4 149.01 µs 335.88 µs 6000008 5378952 5346905 8.9195 ms

Zero-copy deserialization speed

Crate Access Read Update
capnp:
capnp 0.26.0
106.41 ns* 13.390 ms* 2.1422 ms*
columnar 0.13.1 20.984 ns
flatbuffers 25.12.19 2.4903 ns* 44.272 ns* 77.838 µs* 77.878 µs*
nibblecode 0.1.0 1.2449 ns* 1.5568 ns* 38.881 µs* 38.895 µs* 78.668 µs*
rkyv 0.8.16 1.2452 ns* 5.6107 ns* 38.897 µs* 38.921 µs* 75.419 µ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.05%* 1.72%* 1.93% 56.19% 75.27% 77.78% 2.29%
bin-proto 0.12.8 1.78% 1.43% 80.78% 90.18% 90.65% 18.65%
bincode 2.0.1 5.10% 18.84% 80.78% 90.18% 90.65% 18.41%
bincode 1.3.3 2.63% 3.10% 80.78% 90.18% 90.65% 18.27%
bitcode 0.6.9 11.34% 18.45% 80.78% 93.59% 98.48% 12.25%
borsh 1.7.0 2.41% 3.53% 80.78% 90.18% 90.65% 18.62%
capnp:
capnp 0.26.0
1.52% 0.76%* 34.62% 46.60%* 68.02% 66.37%* 80.16% 61.18%* 1.97% 2.47%*
cbor:
cbor4ii 1.2.2
1.66% 0.33% 36.93% 64.46% 71.73% 1.78%
cbor:
ciborium 0.2.2
0.22% 0.13% 36.94% 64.46% 71.71% 1.76%
cbor:
serde_cbor 0.11.2
0.41% 0.37% 36.94% 64.46% 71.71% 1.82%
columnar 0.13.1 8.54% 10.30% 22.19%* 80.78% 90.18% 90.65% 18.80%
compactly 0.1.7 0.04% 0.09% 100.00% 100.00% 100.00% 100.00%
databuf 0.5.0 6.14% 2.75% 80.78% 90.18% 90.65% 18.23%
dlhn 0.1.7 2.46% 2.12% 80.78% 90.18% 90.65% 18.41%
flatbuffers 25.12.19 32.95% 80.78% 90.18% 90.65% 18.95%
flexbuffers 25.12.19 0.14% 0.19% 18.21% 40.75% 38.82% 1.10%
json:
flexon 0.4.6
0.19% 0.27% 18.50% 50.70% 56.46% 1.07%
json:
serde_json 1.0.150
0.16% 0.15% 18.50% 50.70% 56.46% 1.06%
json:
simd-json 0.17.0
0.28% 0.22% 18.50% 50.70% 56.46% 1.06%
messagepack:
msgpacker 0.7.1
22.10% 2.82% 64.62% 80.05% 80.59% 15.73%
messagepack:
rmp-serde 1.3.1
0.75% 0.90% 59.65% 74.68% 75.84% 2.25%
messagepack:
zerompk 0.6.0
20.16% 2.86% 59.65% 74.68% 75.84% 2.17%
minicbor 2.2.2 2.85% 1.27% 59.65% 74.67% 75.84% 2.37%
nachricht-serde 0.4.0 0.12% 0.57% 59.65% 74.69% 75.89% 2.26%
nanoserde 0.2.1 9.17% 16.64% 80.78% 90.18% 90.65% 18.36%
nibblecode 0.1.0 99.79% 80.78% 90.18% 90.65% 18.68%
postcard 1.1.3 29.99% 15.61% 80.78% 90.18% 90.65% 18.99%
pot 3.0.1 0.39% 0.23% 47.88% 71.17% 70.73% 2.03%
protobuf:
buffa 0.8.0
1.70%* 0.59%* 0.57% 55.39% 72.76% 75.47% 2.28%
protobuf:
prost 0.14.4
1.84%* 1.71%* 1.00% 55.39% 72.76% 75.47% 2.16%
protobuf:
protobuf 3.7.2
0.89%* 0.45%* 0.49% 55.39% 72.76% 75.47% 2.10%
rkyv 0.8.16 78.55% 97.85%* 97.87%* 80.78% 90.18% 90.65% 18.52%
ron 0.12.2 0.08% 0.03% 21.84% 54.07% 59.56% 1.11%
savefile 0.20.4 99.97% 100.00% 80.78% 90.17% 90.65% 18.87%
scale:
parity-scale-codec 3.7.5
2.87% 3.17% 80.78% 90.18% 90.65% 18.71%
serde-brief 0.2.0 0.82% 0.41% 30.77% 60.44% 71.14% 1.73%
serde_bare 0.5.0 2.51% 3.04% 80.78% 90.18% 90.65% 18.18%
speedy 0.8.7 100.00% 99.25% 80.78% 90.18% 90.65% 18.58%
wincode 0.5.5 99.14% 99.66% 80.78% 90.18% 90.65% 18.62%
wiring 0.2.4 99.47% 44.22% 80.78% 90.17% 90.65% 18.50%

Zero-copy deserialization speed

Crate Access Read Update
capnp:
capnp 0.26.0
1.17%* 0.29%* 1.82%*
columnar 0.13.1 5.93%
flatbuffers 25.12.19 49.99%* 2.81%* 49.95%* 49.93%*
nibblecode 0.1.0 100.00%* 79.97%* 100.00%* 99.96%* 95.87%*
rkyv 0.8.16 99.98%* 22.19%* 99.96%* 99.90%* 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.97 µs* 795.02 µs* 3.1625 ms 1.7225 ms 489348 281173 249360 2.6788 ms
bin-proto 0.12.8 1.8581 ms 2.8534 ms 566975 239350 231475 2.5009 ms
bincode 2.0.1 340.49 µs 1.8403 ms 799.17 µs 367413 221291 206242 2.2088 ms
bincode 1.3.3 596.41 µs 1.8399 ms 858.28 µs 569975 240525 231884 2.4433 ms
bitcode 0.6.9 127.11 µs 1.2638 ms 171.04 µs 327688 200947 182040 809.45 µs
borsh 1.7.0 562.42 µs 1.7960 ms 446595 234236 209834 2.6498 ms
capnp:
capnp 0.26.0
483.28 µs 1.0448 ms* 803896 489017* 335606 293127* 280744 271528* 3.6613 ms 2.6272 ms*
cbor:
cbor4ii 1.2.2
772.91 µs 4.4026 ms 3.2666 ms 1109831 344745 274333 3.4813 ms
cbor:
ciborium 0.2.2
3.6679 ms 9.8464 ms 1109821 344751 274345 3.4456 ms
cbor:
serde_cbor 0.11.2
1.8529 ms 4.5582 ms 3.3017 ms 1109821 344751 274345 3.5084 ms
columnar 0.13.1 259.10 µs 1.8571 ms 691.64 µs* 563392 249619 217632 1.6632 ms
compactly 0.1.7 9.1664 ms 6.5123 ms 148461 148599 148473 176.95 µs
databuf 0.5.0 291.85 µs 1.7485 ms 810.60 µs 356311 213062 198403 2.0769 ms
dlhn 0.1.7 703.08 µs 2.6210 ms 366496 220600 205586 2.1051 ms
flatbuffers 25.12.19 3.2855 ms 849472 347816 294871 3.4216 ms
flexbuffers 25.12.19 7.7614 ms 7.1447 ms 5.9004 ms 1187688 557642 553730 6.1821 ms
json:
flexon 0.4.6
2.7657 ms 4.5734 ms 1623191 466527 359157 5.7253 ms
json:
serde_json 1.0.150
3.5850 ms 6.8250 ms 1623191 466527 359157 5.7849 ms
json:
simd-json 0.17.0
2.2158 ms 4.5936 ms 1623191 466527 359157 5.7210 ms
messagepack:
msgpacker 0.7.1
329.96 µs 2.7877 ms 1.3065 ms 391251 236877 220395 2.2728 ms
messagepack:
rmp-serde 1.3.1
1.5528 ms 3.0632 ms 1.7579 ms 424533 245214 226077 2.3003 ms
messagepack:
zerompk 0.6.0
348.24 µs 2.0912 ms 870.42 µs 416025 243812 224965 2.3230 ms
minicbor 2.2.2 574.66 µs 3.3763 ms 1.8706 ms 428773 249857 228630 2.3253 ms
nachricht-serde 0.4.0 5.1074 ms 3.8666 ms 2.7368 ms 449745 252432 230965 2.3740 ms
nanoserde 0.2.1 265.46 µs 1.8806 ms 567975 239930 231872 2.4857 ms
nibblecode 0.1.0 178.91 µs 603928 429392 404860 3.6788 ms
postcard 1.1.3 446.35 µs 2.1828 ms 847.33 µs 367489 221913 207244 2.0978 ms
pot 3.0.1 2.3778 ms 5.8141 ms 4.7710 ms 599125 299158 247675 2.7355 ms
protobuf:
buffa 0.8.0
1.1061 ms* 3.1301 ms* 3.4990 ms 2.6427 ms 596811 305319 268737 3.0525 ms
protobuf:
prost 0.14.4
1.2643 ms* 3.0398 ms* 3.5880 ms 596811 305319 268737 3.0461 ms
protobuf:
protobuf 3.7.2
1.1214 ms* 3.1052 ms* 3.7928 ms 596811 305319 268737 3.0967 ms
rkyv 0.8.16 328.69 µs 1.5110 ms* 1.8712 ms* 603776 254776 219421 2.3558 ms
ron 0.12.2 8.4553 ms 26.664 ms 24.928 ms 1465223 434935 342907 5.5141 ms
savefile 0.20.4 210.11 µs 2.0100 ms 566991 239362 231478 2.5104 ms
scale:
parity-scale-codec 3.7.5
641.91 µs 2.0710 ms 356311 212976 198423 2.0175 ms
serde-brief 0.2.0 1.1684 ms 5.1362 ms 3.4752 ms 1276014 373898 293384 3.6423 ms
serde_bare 0.5.0 736.93 µs 2.3287 ms 356311 213062 198403 2.0069 ms
speedy 0.8.7 270.80 µs 1.6770 ms 547.34 µs 449595 234970 210192 2.1806 ms
wincode 0.5.5 208.17 µs 1.6343 ms 554.95 µs 566975 239350 231475 2.5309 ms
wiring 0.2.4 207.69 µs 1.9000 ms 566975 247810 225086 2.6798 ms

Zero-copy deserialization speed

Crate Access Read Update
capnp:
capnp 0.26.0
76.563 ns* 583.53 µs* 420.17 ns*
columnar 0.13.1 733.18 ns
flatbuffers 25.12.19 2.4897 ns* 2.1659 ms* 1.4275 µs* 2.1640 ms*
nibblecode 0.1.0 1.2447 ns* 253.35 µs* 156.18 ns* 253.88 µs* 730.74 ns*
rkyv 0.8.16 1.2456 ns* 340.15 µs* 156.22 ns* 340.19 µs* 726.64 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.61%* 15.99%* 21.87% 9.93% 30.34% 52.85% 59.54% 6.61%
bin-proto 0.12.8 6.84% 24.24% 26.18% 62.08% 64.14% 7.08%
bincode 2.0.1 37.33% 37.58% 21.40% 40.41% 67.15% 71.99% 8.01%
bincode 1.3.3 21.31% 37.59% 19.93% 26.05% 61.78% 64.03% 7.24%
bitcode 0.6.9 100.00% 54.73% 100.00% 45.31% 73.95% 81.56% 21.86%
borsh 1.7.0 22.60% 38.51% 33.24% 63.44% 70.76% 6.68%
capnp:
capnp 0.26.0
26.30% 12.17%* 18.47% 30.36%* 44.28% 50.69%* 52.89% 54.68%* 4.83% 6.74%*
cbor:
cbor4ii 1.2.2
16.45% 15.71% 5.24% 13.38% 43.10% 54.12% 5.08%
cbor:
ciborium 0.2.2
3.47% 7.02% 13.38% 43.10% 54.12% 5.14%
cbor:
serde_cbor 0.11.2
6.86% 15.17% 5.18% 13.38% 43.10% 54.12% 5.04%
columnar 0.13.1 49.06% 37.24% 100.00%* 26.35% 59.53% 68.22% 10.64%
compactly 0.1.7 1.39% 10.62% 100.00% 100.00% 100.00% 100.00%
databuf 0.5.0 43.55% 39.56% 21.10% 41.67% 69.74% 74.83% 8.52%
dlhn 0.1.7 18.08% 26.39% 40.51% 67.36% 72.22% 8.41%
flatbuffers 25.12.19 3.87% 17.48% 42.72% 50.35% 5.17%
flexbuffers 25.12.19 1.64% 9.68% 2.90% 12.50% 26.65% 26.81% 2.86%
json:
flexon 0.4.6
4.60% 15.12% 9.15% 31.85% 41.34% 3.09%
json:
serde_json 1.0.150
3.55% 10.13% 9.15% 31.85% 41.34% 3.06%
json:
simd-json 0.17.0
5.74% 15.06% 9.15% 31.85% 41.34% 3.09%
messagepack:
msgpacker 0.7.1
38.52% 24.81% 13.09% 37.95% 62.73% 67.37% 7.79%
messagepack:
rmp-serde 1.3.1
8.19% 22.58% 9.73% 34.97% 60.60% 65.67% 7.69%
messagepack:
zerompk 0.6.0
36.50% 33.07% 19.65% 35.69% 60.95% 66.00% 7.62%
minicbor 2.2.2 22.12% 20.49% 9.14% 34.62% 59.47% 64.94% 7.61%
nachricht-serde 0.4.0 2.49% 17.89% 6.25% 33.01% 58.87% 64.28% 7.45%
nanoserde 0.2.1 47.88% 36.78% 26.14% 61.93% 64.03% 7.12%
nibblecode 0.1.0 71.05% 24.58% 34.61% 36.67% 4.81%
postcard 1.1.3 28.48% 31.69% 20.19% 40.40% 66.96% 71.64% 8.44%
pot 3.0.1 5.35% 11.90% 3.58% 24.78% 49.67% 59.95% 6.47%
protobuf:
buffa 0.8.0
11.49%* 4.06%* 19.77% 6.47% 24.88% 48.67% 55.25% 5.80%
protobuf:
prost 0.14.4
10.05%* 4.18%* 19.28% 24.88% 48.67% 55.25% 5.81%
protobuf:
protobuf 3.7.2
11.33%* 4.09%* 18.24% 24.88% 48.67% 55.25% 5.71%
rkyv 0.8.16 38.67% 45.77%* 36.96%* 24.59% 58.33% 67.67% 7.51%
ron 0.12.2 1.50% 2.59% 0.69% 10.13% 34.17% 43.30% 3.21%
savefile 0.20.4 60.50% 34.41% 26.18% 62.08% 64.14% 7.05%
scale:
parity-scale-codec 3.7.5
19.80% 33.40% 41.67% 69.77% 74.83% 8.77%
serde-brief 0.2.0 10.88% 13.47% 4.92% 11.63% 39.74% 50.61% 4.86%
serde_bare 0.5.0 17.25% 29.70% 41.67% 69.74% 74.83% 8.82%
speedy 0.8.7 46.94% 41.24% 31.25% 33.02% 63.24% 70.64% 8.11%
wincode 0.5.5 61.06% 42.32% 30.82% 26.18% 62.08% 64.14% 6.99%
wiring 0.2.4 61.20% 36.40% 26.18% 59.96% 65.96% 6.60%

Zero-copy deserialization speed

Crate Access Read Update
capnp:
capnp 0.26.0
1.63%* 0.03%* 37.17%*
columnar 0.13.1 0.17%
flatbuffers 25.12.19 49.99%* 0.00%* 10.94%* 0.01%*
nibblecode 0.1.0 100.00%* 0.00%* 100.00%* 0.06%* 99.44%*
rkyv 0.8.16 99.93%* 0.00%* 99.97%* 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.5262 ms* 2.5028 ms* 8.5466 ms 1704643 1294259 1245668 11.642 ms
bin-proto 0.12.8 5.4619 ms 6.7146 ms 1791489 1127998 1051146 10.223 ms
bincode 2.0.1 1.2842 ms 3.8056 ms 1406257 1117802 1062438 9.5018 ms
bincode 1.3.3 3.7870 ms 4.5051 ms 1854234 1141994 1048745 10.367 ms
bitcode 0.6.9 701.08 µs 2.3760 ms 971318 878034 850340 2.9191 ms
borsh 1.7.0 2.8105 ms 2.8504 ms 1521989 1108471 1038528 9.9238 ms
capnp:
capnp 0.26.0
2.6850 ms 4.5496 ms* 2724288 1616255* 1546992 1278764* 1239111 1125654* 14.381 ms 8.6907 ms*
cbor:
cbor4ii 1.2.2
3.4675 ms 16.942 ms 6012539 1695215 1464951 21.235 ms
cbor:
ciborium 0.2.2
23.999 ms 53.105 ms 6012373 1695146 1465025 21.394 ms
cbor:
serde_cbor 0.11.2
10.314 ms 19.947 ms 6012373 1695146 1465025 21.093 ms
columnar 0.13.1 891.30 µs 3.7179 ms 1.2761 ms* 1544720 996718 896213 4.7816 ms
compactly 0.1.7 53.147 ms 33.436 ms 800772 801349 800799 490.01 µs
databuf 0.5.0 1.3065 ms 3.7824 ms 1319999 1062631 1008334 8.8591 ms
dlhn 0.1.7 4.4202 ms 6.5524 ms 1311281 1077520 1046095 8.8112 ms
flatbuffers 25.12.19 5.2671 ms 2325620 1439185 1268060 13.577 ms
flexbuffers 25.12.19 40.133 ms 36.770 ms 5352680 2658295 2777967 34.780 ms
json:
flexon 0.4.6
15.331 ms 24.067 ms 9390461 2391679 1842767 34.545 ms
json:
serde_json 1.0.150
19.898 ms 31.002 ms 9390461 2391679 1842767 34.645 ms
json:
simd-json 0.17.0
12.121 ms 25.106 ms 9390461 2391679 1842767 34.430 ms
messagepack:
msgpacker 0.7.1
935.58 µs 5.5019 ms 1458773 1156055 1137788 9.7079 ms
messagepack:
rmp-serde 1.3.1
10.903 ms 11.491 ms 1745322 1261627 1228923 11.539 ms
messagepack:
zerompk 0.6.0
1.1203 ms 4.1926 ms 1717696 1234725 1195988 11.136 ms
minicbor 2.2.2 2.3084 ms 11.519 ms 1777386 1276218 1252558 12.618 ms
nachricht-serde 0.4.0 30.077 ms 16.155 ms 1770060 1277755 1263362 12.575 ms
nanoserde 0.2.1 1.2944 ms 2.7556 ms 1812404 1134820 1053109 10.371 ms
nibblecode 0.1.0 505.31 µs 2075936 1518443 1413193 14.034 ms
postcard 1.1.3 1.8074 ms 4.1911 ms 1311281 1083900 1041434 8.7018 ms
pot 3.0.1 13.809 ms 28.920 ms 2604812 1482233 1298928 15.974 ms
protobuf:
buffa 0.8.0
3.6219 ms* 11.075 ms* 14.918 ms 1859886 1338076 1295351 12.408 ms
protobuf:
prost 0.14.4
5.4766 ms* 9.5001 ms* 8.6310 ms 1859886 1338076 1295351 12.967 ms
protobuf:
protobuf 3.7.2
5.7179 ms* 13.024 ms* 11.971 ms 1859886 1338076 1295351 12.390 ms
rkyv 0.8.16 979.11 µs 2.1818 ms* 2.6611 ms* 2075936 1383779 1210377 13.079 ms
ron 0.12.2 46.073 ms 170.77 ms 8677703 2233642 1826180 34.273 ms
savefile 0.20.4 856.22 µs 2.8340 ms 1791505 1128012 1051153 10.344 ms
scale:
parity-scale-codec 3.7.5
3.1627 ms 3.3369 ms 1319999 1064380 1010708 8.9164 ms
serde-brief 0.2.0 5.4023 ms 20.759 ms 6951772 1796265 1567819 23.404 ms
serde_bare 0.5.0 4.0930 ms 4.9713 ms 1319999 1062645 1008349 8.9199 ms
speedy 0.8.7 762.04 µs 2.4455 ms 1584734 1119837 1037992 10.042 ms
wincode 0.5.5 568.01 µs 2.3163 ms 1791489 1127998 1051146 10.309 ms
wiring 0.2.4 636.33 µs 2.7939 ms 1791489 1156963 1082815 10.603 ms

Zero-copy deserialization speed

Crate Access Read Update
capnp:
capnp 0.26.0
77.715 ns* 1.9882 ms* 725.64 ns*
columnar 0.13.1 52.440 ns
flatbuffers 25.12.19 2.4898 ns* 6.1054 ms* 2.7486 µs* 6.1062 ms*
nibblecode 0.1.0 1.2449 ns* 370.89 µs* 385.03 ns* 375.27 µs* 237.93 ns*
rkyv 0.8.16 1.2450 ns* 459.44 µs* 385.76 ns* 459.63 µs* 235.58 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 11.16%* 20.19%* 14.93% 46.98% 61.92% 64.29% 4.21%
bin-proto 0.12.8 9.25% 19.00% 44.70% 71.04% 76.18% 4.79%
bincode 2.0.1 39.35% 33.53% 56.94% 71.69% 75.37% 5.16%
bincode 1.3.3 13.34% 28.33% 43.19% 70.17% 76.36% 4.73%
bitcode 0.6.9 72.08% 53.71% 82.44% 91.27% 94.17% 16.79%
borsh 1.7.0 17.98% 44.77% 52.61% 72.29% 77.11% 4.94%
capnp:
capnp 0.26.0
18.82% 11.11%* 29.39% 49.54%* 51.80% 62.67%* 64.63% 71.14%* 3.41% 5.64%*
cbor:
cbor4ii 1.2.2
14.57% 7.53% 13.32% 47.27% 54.66% 2.31%
cbor:
ciborium 0.2.2
2.11% 2.40% 13.32% 47.27% 54.66% 2.29%
cbor:
serde_cbor 0.11.2
4.90% 6.40% 13.32% 47.27% 54.66% 2.32%
columnar 0.13.1 56.69% 34.32% 100.00%* 51.84% 80.40% 89.35% 10.25%
compactly 0.1.7 0.95% 3.82% 100.00% 100.00% 100.00% 100.00%
databuf 0.5.0 38.68% 33.74% 60.66% 75.41% 79.42% 5.53%
dlhn 0.1.7 11.43% 19.48% 61.07% 74.37% 76.55% 5.56%
flatbuffers 25.12.19 9.59% 34.43% 55.68% 63.15% 3.61%
flexbuffers 25.12.19 1.26% 3.47% 14.96% 30.15% 28.83% 1.41%
json:
flexon 0.4.6
3.30% 5.30% 8.53% 33.51% 43.46% 1.42%
json:
serde_json 1.0.150
2.54% 4.12% 8.53% 33.51% 43.46% 1.41%
json:
simd-json 0.17.0
4.17% 5.08% 8.53% 33.51% 43.46% 1.42%
messagepack:
msgpacker 0.7.1
54.01% 23.19% 54.89% 69.32% 70.38% 5.05%
messagepack:
rmp-serde 1.3.1
4.63% 11.11% 45.88% 63.52% 65.16% 4.25%
messagepack:
zerompk 0.6.0
45.10% 30.44% 46.62% 64.90% 66.96% 4.40%
minicbor 2.2.2 21.89% 11.08% 45.05% 62.79% 63.93% 3.88%
nachricht-serde 0.4.0 1.68% 7.90% 45.24% 62.72% 63.39% 3.90%
nanoserde 0.2.1 39.04% 46.31% 44.18% 70.61% 76.04% 4.72%
nibblecode 0.1.0 100.00% 38.57% 52.77% 56.67% 3.49%
postcard 1.1.3 27.96% 30.45% 61.07% 73.93% 76.89% 5.63%
pot 3.0.1 3.66% 4.41% 30.74% 54.06% 61.65% 3.07%
protobuf:
buffa 0.8.0
13.95%* 4.56%* 8.55% 43.05% 59.89% 61.82% 3.95%
protobuf:
prost 0.14.4
9.23%* 5.32%* 14.79% 43.05% 59.89% 61.82% 3.78%
protobuf:
protobuf 3.7.2
8.84%* 3.88%* 10.66% 43.05% 59.89% 61.82% 3.95%
rkyv 0.8.16 51.61% 58.49%* 47.95%* 38.57% 57.91% 66.16% 3.75%
ron 0.12.2 1.10% 0.75% 9.23% 35.88% 43.85% 1.43%
savefile 0.20.4 59.02% 45.03% 44.70% 71.04% 76.18% 4.74%
scale:
parity-scale-codec 3.7.5
15.98% 38.24% 60.66% 75.29% 79.23% 5.50%
serde-brief 0.2.0 9.35% 6.15% 11.52% 44.61% 51.08% 2.09%
serde_bare 0.5.0 12.35% 25.67% 60.66% 75.41% 79.42% 5.49%
speedy 0.8.7 66.31% 52.18% 50.53% 71.56% 77.15% 4.88%
wincode 0.5.5 88.96% 55.09% 44.70% 71.04% 76.18% 4.75%
wiring 0.2.4 79.41% 45.67% 44.70% 69.26% 73.96% 4.62%

Zero-copy deserialization speed

Crate Access Read Update
capnp:
capnp 0.26.0
1.60%* 0.02%* 53.06%*
columnar 0.13.1 2.37%
flatbuffers 25.12.19 50.00%* 0.00%* 14.01%* 0.01%*
nibblecode 0.1.0 100.00%* 0.00%* 100.00%* 0.10%* 99.01%*
rkyv 0.8.16 99.99%* 0.00%* 99.81%* 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

 
 
 

Contributors

Languages